Ship Docker configs that
actually work in production
Stop copying half-broken docker-compose files from old blog posts. These are battle-tested stacks with real health checks, resource limits, secrets handling, and TLS — ready to drop into any Linux server.
- No hardcoded secrets — all secrets in .env, never committed to git
- Health checks on every service — use
service_healthycondition - CPU and memory limits on all containers
- Pinned image versions — never use
:latest - Non-root user in app containers
Most docker-compose files you find online are broken by default
No health checks, so dependent services start before the database is ready. No resource limits, so one container can starve the whole server. Secrets in environment variables with no .env.example. TLS left as "an exercise for the reader."
Then you spend half a day debugging a container restart loop that a proper health check would have caught in 30 seconds.
5 complete production stacks
Full-stack web app with NGINX reverse proxy, TLS termination, rate limiting, and gzip. The most common production pattern, done right.
Python API with async SQLAlchemy, Celery background workers, RedBeat periodic tasks, and Flower monitoring dashboard.
WordPress FPM behind NGINX with Redis object caching, MySQL 8, WP-CLI side container, and file-edit disabled by default.
Full observability setup: Prometheus scraping host and container metrics, Grafana with pre-wired datasources, Alertmanager for notifications.
Centralized log aggregation with Elasticsearch 8, Logstash pipelines, Kibana, and Filebeat shipping Docker container logs automatically.
Production standards, not demo shortcuts
- Health checks on every service — no more "depends_on" race conditions
- CPU and memory resource limits per container
- Proper
.env.examplewith every required variable documented - Named volumes with explicit persistence strategy
- Restart policies (
unless-stopped) set on all long-running services - TLS configuration and NGINX reverse proxy where applicable
- Pinned image versions — no
:latestsurprises on redeploy - README with quick-start, production checklist, and scaling notes
Questions
A ZIP file with 5 directories, one per stack. Each has a docker-compose.yml, .env.example, nginx config files where relevant, and a README with a quick-start and production checklist.
Images are pinned to the latest stable release as of March 2026: PostgreSQL 16, Redis 7, NGINX 1.25, MySQL 8, Elasticsearch/Kibana/Logstash 8.11, Grafana 10.2, Prometheus 2.49. You can update the tag at any time.
The web app and FastAPI stacks run comfortably on 1GB RAM. The monitoring and ELK stacks need at least 4GB due to Elasticsearch's JVM heap. Resource limits in the compose files are documented with these thresholds in mind.
Yes, unlimited use, commercial or personal. No attribution required.
Email templates@occam.cc and describe what you ran into. I'll fix the template or explain the adjustment needed.
Stop debugging docker-compose at 2am
One-time $29. Drop them into any project. Adjust the service names and you're done.