Skip to content

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.

Port8000 (host) → 8000 (container)
Env filedjango-api/.env
Volume./django-api mounted to /app; venv persisted in django_venv named volume
ProductionSame 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.

Port8100 (host) → 3306 (container)
Env filedjango-api/.env (shares credentials with Django)
Volumedb_data named volume
ProductionReplaced 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.

PortNot exposed to host
ProductionReplaced by ElastiCache Redis.

celerybeat

Periodic task scheduler. Inherits the full django service definition, overrides the command to start the Celery beat process.

PortNone
Command/start beat
ProductionRuns on the same EC2 instance as Django.

celeryworker

Async task worker. Inherits from django, uses SIGINT for graceful shutdown.

PortNone
Command/start worker
ProductionRuns 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.

Port3000 (host) → 3000 (container)
Env fileportals/.env
ProductionNot 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.

Port8090 (host) → 8090 (container)
Startmake reports
ProductionNot deployed. Local development tool only.

docs

VitePress dev server for this documentation site.

Port4173 (host) → 4173 (container)
Startmake docs
ProductionNot deployed. Local development tool only.

Named volumes

VolumeUsed byPurpose
django_venvdjango, celerybeat, celeryworkerPython virtualenv — avoids reinstall on restart
db_datadbMySQL data directory
portals_node_modulesportalsNode modules — avoids reinstall on restart
docs_node_modulesdocsNode modules — avoids reinstall on restart

Nova Home Care — Internal Operational Docs