← Back to all posts

Docker Compose in production: the honest checklist

Published October 1, 2026

⏱️ 2 min read

Compose is not the problem

A well-configured docker-compose.yml runs small production workloads fine. What fails is the default config: no restart policy, unbounded logs, no probes. Run this checklist and Compose stops being your weak link.

The nine checks

  1. restart: unless-stopped on every service. Without it, a host reboot leaves you dark.
  2. Log caps:
    logging:
      driver: json-file
      options: {max-size: "10m", max-file: "3"}
    Unbounded json-files are the #1 disk-full cause we see.
  3. Healthchecks: real healthchecks plus depends_on: condition: service_healthy, so the app does not boot before the DB accepts connections.
  4. Memory limits per service (mem_limit) — the OOM killer otherwise shoots the whole host.
  5. Pinned image tags, never latest. Reproducibility beats convenience.
  6. Secrets out of the file: env_file gitignored, or Docker secrets.
  7. Pull policy: pull_policy: always on deploy nodes so rollback-by-tag actually works.
  8. Networks: internal network for DB traffic; only the proxy publishes ports.
  9. A real reverse proxy (Caddy/Nginx) with auto-TLS in front, not raw app ports.

When to graduate

Compose stops being honest past one host, or when you need rolling deploys. Then move to Swarm-mode Compose files or Kubernetes — same YAML instincts, better control plane. Lab both cheaply on hourly cloud boxes: Vultr or DigitalOcean. (Partner links.)

Partner pick — sponsored

Sentry — our error-tracking pick for this stack

See the exact line of code that broke — before your users report it. Free tier for small teams.

Get Sentry →
Also vetted

Vultr — Spin a disposable box to replay this failure without touching prod.

Get Vultr →

We earn a commission if you buy through our links — it never costs you extra. More vetted tools on our picks hub · comparing clouds? DigitalOcean vs Vultr and vs AWS · full deals: DigitalOcean · Vultr · NordLayer · Semrush

#AmazonAssociate — As an Amazon Associate I earn from qualifying purchases. Full disclosure →