Quickstart
Developing with Docker compose
To build a local Docker compose environment:
# Create an environment file based on the sample
$ cp .envs/local/django.sample .envs/local/django
# This command can take quite a while the first time
$ make dockerbuild
Start a local multi-container application with Postgres, Redis, Celery, and Django:
$ make dockerserve
To get a shell into the Django container where you can run ./manage.py createsuperuser
,
get a Django shell, or run other commands:
$ make dockershell
...
/app # ./manage.py createsuperuser
After setting up your super user account on your local development instance,
you’ll still need to set the Set the ad server URL
to something like localhost:5000
.
Developing locally
Docker compose is the recommended way to do development consistently. This section is more to document steps than to encourage you to develop outside of Docker.
Requirements
Python 3.10
Nodejs (tested with v14)
Front-end assets
To build the assets:
$ npm install
$ npm run build
Install Python dependencies
$ pip install -r requirements/development.txt
$ pre-commit install # Install a code style pre-commit hook
Run the server
Run migrations:
$ python manage.py migrate
Create a superuser:
$ python manage.py createsuperuser
Run the server:
$ python manage.py runserver
Running the tests
To run the unit tests:
$ pip install -r requirements/testing.txt
$ make test