Compose Services
This page describes each service defined in the root docker-compose.yml — what it does, what port it exposes, and what replaces it in production.
Backend services
django
The main Django application server, run via gunicorn on port 8000. All other backend services (celerybeat, celeryworker) inherit from this definition via the YAML anchor &django.
| Port | 8000 (host) → 8000 (container) |
| Env file | django-api/.env |
| Volume | ./django-api mounted to /app; venv persisted in django_venv named volume |
| Production | Same container, behind Caddy TLS on EC2. Gunicorn serves on the same port. |
db
MySQL 8.0.35 database. Configured with utf8mb4 charset and InnoDB tuning (buffer-pool-size=2G, 16 instances) appropriate for the expected workload.
| Port | 8100 (host) → 3306 (container) |
| Env file | django-api/.env (shares credentials with Django) |
| Volume | db_data named volume |
| Production | Replaced by RDS MySQL 8. The db container is not run in production. |
redis
Redis 7.2.4, used as the Celery broker and result backend.
| Port | Not exposed to host |
| Production | Replaced by ElastiCache Redis. |
celerybeat
Periodic task scheduler. Inherits the full django service definition, overrides the command to start the Celery beat process.
| Port | None |
| Command | /start beat |
| Production | Runs on the same EC2 instance as Django. |
celeryworker
Async task worker. Inherits from django, uses SIGINT for graceful shutdown.
| Port | None |
| Command | /start worker |
| Production | Runs on the same EC2 instance as Django. |
Frontend
portals
React frontend dev server. Runs pnpm install then pnpm start on each container start. Uses a named volume for node_modules to avoid reinstalling on every restart.
| Port | 3000 (host) → 3000 (container) |
| Env file | portals/.env |
| Production | Not run. Replaced by a static build (pnpm build) deployed to Cloudflare Pages or S3+CloudFront. |
Utilities
reports
Lightweight Python HTTP server that serves the Cypress HTML test reports from testing/apps/novahomecare/cypress/reports/html.
| Port | 8090 (host) → 8090 (container) |
| Start | make reports |
| Production | Not deployed. Local development tool only. |
docs
VitePress dev server for this documentation site.
| Port | 4173 (host) → 4173 (container) |
| Start | make docs |
| Production | Not deployed. Local development tool only. |
Named volumes
| Volume | Used by | Purpose |
|---|---|---|
django_venv | django, celerybeat, celeryworker | Python virtualenv — avoids reinstall on restart |
db_data | db | MySQL data directory |
portals_node_modules | portals | Node modules — avoids reinstall on restart |
docs_node_modules | docs | Node modules — avoids reinstall on restart |