5 production-ready stacks

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.

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.

# What most templates look like
services:
  app:
    image: myapp
    depends_on:
      - postgres # starts before postgres is ready
    environment:
      DB_PASS: hardcoded_password # committed to git

# What these templates include
  depends_on:
    postgres:
      condition: service_healthy
  healthcheck:
    test: ["CMD-SHELL", "pg_isready -U app_user"]
    interval: 10s
    retries: 5

5 complete production stacks

01
Node.js Web App

Full-stack web app with NGINX reverse proxy, TLS termination, rate limiting, and gzip. The most common production pattern, done right.

NGINX Node.js PostgreSQL 16 Redis 7 HTTP/2
02
FastAPI Async API

Python API with async SQLAlchemy, Celery background workers, RedBeat periodic tasks, and Flower monitoring dashboard.

FastAPI PostgreSQL 16 Celery Redis 7 Flower
03
WordPress (Production)

WordPress FPM behind NGINX with Redis object caching, MySQL 8, WP-CLI side container, and file-edit disabled by default.

WordPress FPM MySQL 8 Redis NGINX WP-CLI
04
Monitoring Stack

Full observability setup: Prometheus scraping host and container metrics, Grafana with pre-wired datasources, Alertmanager for notifications.

Prometheus Grafana Alertmanager Node Exporter cAdvisor
05
ELK Logging Stack

Centralized log aggregation with Elasticsearch 8, Logstash pipelines, Kibana, and Filebeat shipping Docker container logs automatically.

Elasticsearch 8 Logstash Kibana Filebeat

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.example with 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 :latest surprises on redeploy
  • README with quick-start, production checklist, and scaling notes

Questions

What do I actually get?

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.

What versions are the images pinned to?

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.

Do these work on a cheap $6/month VPS?

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.

Can I use these for commercial projects?

Yes, unlimited use, commercial or personal. No attribution required.

What if a template doesn't work for my setup?

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.