- Create an
.envbased on the example below. You can also set these via your CI/host. - Build and start services:
docker compose up --build- Web: http://localhost:8000
- Health check: http://localhost:8000/health (queues a
pingCelery task)
These are read by Django/Celery and the Postgres container.
# Django
DJANGO_SECRET_KEY=replace-me
DJANGO_DEBUG=1
ALLOWED_HOSTS=*
# Postgres
POSTGRES_DB=exampledb
POSTGRES_USER=exampleuser
POSTGRES_PASSWORD=examplepass
POSTGRES_HOST=db
POSTGRES_PORT=5432
# Redis
REDIS_URL=redis://redis:6379/0
# Timezone
TZ=UTCdocker-compose.ymlstartsweb(Django),worker(Celery),db(Postgres), andredis.webruns migrations automatically on startup, then serves on0.0.0.0:8000.- The
healthendpoint enqueues apingtask so you can verify worker wiring.