Skip to main content
The entire application runs via Docker Compose. All services are defined in docker-compose.yml at the repo root. This page summarizes each service, its role, ports, and dependencies.

Services

ServiceImage / buildPort(s)Description
webBuild from repo root Dockerfile5050Flask app: webhooks, API, test routes. Depends on db and redis. Mounts .:/app and ./backups:/backups.
dbpostgres:155432 (internal)PostgreSQL. Data in volume postgres_data. Env: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB.
redisredis:76379Redis: Celery broker and result backend. Healthcheck: redis-cli ping. Volume redis_data.
celerySame build as webCelery worker: celery -A tasks.celery worker. Depends on redis; uses same DATABASE_URL and CELERY_* as web. Mounts app and backups.
beatSame build as webCelery Beat: celery -A tasks.celery beat with schedule in /tmp. Depends on redis. Volume beat_schedule for schedule persistence.
admin-portalBuild from admin_portal/Dockerfile5002Admin dashboard (Flask + Next.js). Depends on db; mounts ./backups for log viewer.
docsMintlify static build5003Documentation site (Mintlify). Serves static build.
caddycaddy:280, 443Reverse proxy. Mounts ./caddy/Caddyfile. Depends on web and docs (admin-portal can be added). Proxies api/admin/docs subdomains.
ngrokngrok/ngrok:34040 (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 optional S3_BUCKET_NAME for beat/celery).
  • admin-portal: DATABASE_URL, OPENCAGE_API_KEY (for geocoding when editing user location).
  • db: POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB.
Other env (e.g. 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. /tmp in 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.
See Quickstart and Caddy, Ngrok for production vs development usage.