docker-compose/local/compose.yaml.
Prerequisites
Docker
Install Docker Desktop or the Docker Engine with the Compose plugin.
pre-commit
Install pre-commit and run
pre-commit install in the repository root to activate hooks.Getting started
Copy the environment file
Copy the example file and fill in the required values. See Environment variables for the full reference.
Start all services
Run the full stack from the repository root:Or use the convenience Makefile target:Docker Compose starts the following containers:
| Container | Description |
|---|---|
nest-backend | Django application server |
nest-db | PostgreSQL database |
nest-cache | Redis instance |
nest-worker | Django RQ background worker |
Makefile targets
The repository provides a set ofmake targets that execute commands inside the running nest-backend container.
| Target | Command | Description |
|---|---|---|
make migrate | python manage.py migrate | Apply database migrations |
make migrations | python manage.py makemigrations | Generate new migration files |
make create-superuser | python manage.py createsuperuser | Create a Django admin superuser |
make test-backend | pytest (inside Docker) | Run the full backend test suite |
make django-shell | python manage.py shell | Open the interactive Django shell |
make index-data | python manage.py algolia_reindex | Re-index all data in Algolia |
make enrich-data | Multiple management commands | Enrich chapters, projects, and events from external sources |
make dump-data | python manage.py dump_data | Dump the current database state |
make load-data | pg_restore … | Restore the database from a dump |
Running tests
The test suite requires no additional setup beyond having Docker running.pytest-xdist for parallel execution. Coverage must be at or above 95% for the suite to pass.
The backend
.env.example file is used as the environment when running tests, so you do not need a separate test .env.