# Compose in Production and When to Move On — Docker Compose

Source: https://www.skillbyai.com/en/docker-compose/p-prod

> Single host versus orchestration.

## Know the limits

Compose works well for production on a **single host**: small internal tools, side projects, edge devices. Add restart policies, resource limits, log rotation, health checks, a reverse proxy with TLS, backups and monitoring. It does not provide multi-host scheduling, automatic failover across machines, rolling updates across replicas with zero downtime, or autoscaling. When you need those, move to an orchestrator (Kubernetes, managed container services); tools exist to translate Compose files as a starting point.

## Compose or an orchestrator?

A rough guide.

```text
need                                         Compose on one host   orchestrator
small app, one server, short downtime OK     yes                   overkill
several servers, survive a machine failure   no                    yes
autoscaling with traffic                     no                    yes
zero-downtime rolling deploys at scale       limited               yes
local development and CI integration tests   yes                   heavy
```

## Rotate logs

Configure the logging driver options (max-size, max-file) on servers, or container logs can fill the disk.

**Quiz:** What does Compose NOT provide by itself?

- [ ] Named volumes
- [ ] Starting several containers
- [x] Automatic failover across multiple hosts
- [ ] Health checks

*Answer:* Automatic failover across multiple hosts. Multi-host resilience needs an orchestrator.
