Compose is excellent for small-to-mid production stacks — if you treat it like production. This checklist is what we run before calling a VPS or cloud VM “live.”
1. Images and restarts
- Pin tags (
1.2.3) — neverlatestin production restart: unless-stoppedon every long-running service- Healthchecks that hit a real HTTP/TCP endpoint, not just process existence
2. Networking and reverse proxy
Expose only the proxy (80/443). App containers stay on an internal network. Terminate TLS at Nginx or Caddy with Let’s Encrypt auto-renewal.
services:
web:
expose: ["3000"]
networks: [internal]
proxy:
ports: ["80:80", "443:443"]
networks: [internal, edge]
3. Secrets and config
- No secrets in
docker-compose.ymlcommitted to git - Use
.envwith strict file permissions, or Docker secrets / a vault - Separate compose overrides for staging vs production
4. Data, backups, and updates
- Named volumes for databases; document restore steps
- Nightly off-box backups with a tested restore drill
- Update with
pull+ rolling restart; keep previous image digests for rollback - Disk alerts before the volume fills
5. Observability minimum
Centralize container logs, monitor CPU/RAM/disk, and alert on healthcheck failures. A green Compose stack without alerts is a silent outage waiting to happen.
Need a production-ready Compose stack?
We harden Docker + Nginx hosting with SSL, backups, and monitoring.
Book Free Consultation