Docker

Service topology and operational notes for compose deployments.

Services

  • postgres — system of record
  • redis — rate limits and ephemeral coordination
  • app — Next.js standalone server (horizontally scalable)
  • nginx — dynamic load balancer & reverse proxy on port 2121 by default

Scaling & Replicas

Scale backend replicas dynamically with docker compose up -d --scale app=3. Nginx resolves container replicas via Docker DNS and load balances requests automatically with zero-downtime failover.

Volumes

Persist database data, uploads, logs, and backups on named volumes. Do not delete volumes during routine upgrades.