Skip to content

Repository files navigation

Backstage PAT Database

This is the repository for the Backstage PAT Database, which stores records of our electrical tests (Portable Appliance Testing) and repairs.

For more in depth information on our equipment, see the Asset Database.

Administrative information can be found on the Wiki.

Development pre-requisites

  • Docker - for running the site and auxiliary services in containers
  • Cloned repo - this repository cloned to your local machine

Running the system

Setup environment variables

Copy .env.example to .env and populate the SECRET_KEY with any random string.

Build the project

The site itself runs inside of a docker container during development so that dependencies can be managed easily.

Build the project by running: scripts/site.sh rebuild (not as root)

Start auxiliary services

This system includes the following services to aid development:

  • MariaDB database (port 6021)
  • Mail server (view emails sent by the system without actually sending)

Run scripts/site.sh start to start them.

The main site will be available at http://localhost:8000

Setup Python environment

If using an IDE with support for a custom interpreter, be sure to change the Python interpreter to the one created by Pipenv for linting to work properly.

Run database migrations

Run scripts/site.sh manage migrate to apply the database migrations.

Creating an account

Create the first admin account by running scripts/site.sh manage createsuperuser and following the prompts.

Packages

Used by

Contributors

Languages