Performance Platform admin
We recommend using virtualenv to manage this application's dependencies. If you are using the performance platform development VM, run
workon performanceplatform-admin to source this.
To set up, run:
pip install -r requirements.txt
Redis is also required to run the application. It is already on the dev vm. If you prefer to install it locally:
brew install redis
To start run
While the default command is enough to run the app locally, a good guide to adding redis to launchctl can be found here if you're more ambitious.
Bypassing signon in dev
If you're running this in dev, an additional route '/sign-in' is available to bypass authing with signon.
Getting set up with GOV.UK's single sign-on service
- Create a signon application and user
- Update development config with OAuth2 credentials
- Set an environment variable to allow OAuth over insecure TLS in development:
- Run the app as normal
If you need to compile stylesheets outside of the normal app starting process then run:
Running the app
This app expects two environment variables to be set:
Redis needs to be running when booting the app locally.
export PORT=3070 export REDIS_URL=redis://localhost:6379/12 python start.py
or if you're using the Performance Platform development environment you can
Starting the app in development will automatically compile stylesheets.
You can modify your local configuration without affecting version control using
the instructions in the
Redis needs to be running before starting the tests.
Populating the DB with 'seed' values
Clone the stagecraft repo then from that folder, run:
bash tools/replicate-db.sh api-postgresql-primary-1.api.integration govuk_dev