docker-compose.yml at the repo root. This page summarizes each service, its role, ports, and dependencies.
Services
| Service | Image / build | Port(s) | Description |
|---|---|---|---|
| web | Build from repo root Dockerfile | 5050 | Flask app: webhooks, API, test routes. Depends on db and redis. Mounts .:/app and ./backups:/backups. |
| db | postgres:15 | 5432 (internal) | PostgreSQL. Data in volume postgres_data. Env: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB. |
| redis | redis:7 | 6379 | Redis: Celery broker and result backend. Healthcheck: redis-cli ping. Volume redis_data. |
| celery | Same build as web | — | Celery worker: celery -A tasks.celery worker. Depends on redis; uses same DATABASE_URL and CELERY_* as web. Mounts app and backups. |
| beat | Same build as web | — | Celery Beat: celery -A tasks.celery beat with schedule in /tmp. Depends on redis. Volume beat_schedule for schedule persistence. |
| admin-portal | Build from admin_portal/Dockerfile | 5002 | Admin dashboard (Flask + Next.js). Depends on db; mounts ./backups for log viewer. |
| docs | Mintlify static build | 5003 | Documentation site (Mintlify). Serves static build. |
| caddy | caddy:2 | 80, 443 | Reverse proxy. Mounts ./caddy/Caddyfile. Depends on web and docs (admin-portal can be added). Proxies api/admin/docs subdomains. |
| ngrok | ngrok/ngrok:3 | 4040 (dashboard) | Dev only (profiles: [dev]). Exposes web (5050) via public HTTPS. Mounts ./ngrok_config/ngrok.yml. |
Environment
- web, celery, beat:
DATABASE_URL,CELERY_BROKER_URL,CELERY_RESULT_BACKEND(and optionalS3_BUCKET_NAMEfor beat/celery). - admin-portal:
DATABASE_URL,OPENCAGE_API_KEY(for geocoding when editing user location). - db:
POSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB.
WHATSAPP_PHONE_NUMBER_ID, WHATSAPP_ACCESS_TOKEN, OPENCAGE_API_KEY for web) are typically set via .env or passed in the compose file.
Volumes
- postgres_data — PostgreSQL data.
- redis_data — Redis persistence.
- beat_schedule — Celery Beat schedule file (e.g.
/tmpin beat container). - caddy_data, caddy_config — Caddy TLS and config cache.
- Bind mounts:
.:/app(web, celery, beat),./backups:/backups(web, celery, beat, admin-portal),./caddy/Caddyfile,./ngrok_config/ngrok.yml.
Running
- Standard:
docker compose up -d— starts all services except ngrok. - With ngrok:
docker compose --profile dev up -d— also starts ngrok for local webhook testing.
