Set up a local development environment with:
just devenv
just npm-install
just npm-build
just collectstatic
just migrate
Start a development server with:
just run
Run the tests with:
just test <args>
Any args are passed to pytest.
Deployment uses dokku
and requires the environment variables defined in dotenv-sample
.
It is deployed to our dokku3
instance (see Dokku Deployment).
To add a new action, first edit actions/jobs/daily/fetch_action.py
.
Then, as the dokku
user on dokku3, run:
dokku enter actions-registry
This starts a bash session connected to the docker container running the application. Finally, run:
python manage.py runjob actions fetch_action
This fetches metadata about all actions from GitHub.
- Log into the opensafely-readonly GitHub account (the credentials are in Bitwarden)
- Go to Settings / Developer settings / Personal access tokens / Tokens (classic)
- Click on actions-registry-token
- Click on Regenerate token
- Set the expiry to 90 days
- Copy the new token
- ssh into
dokku3.ebmdatalab.net
- Run
dokku config:set actions-registry GITHUB_TOKEN=<the new token>