DO

Docker Compose

Local development orchestration and health checks

Details

Language / Topic
dockerDocker
Category
Tooling

Rules

balanced
- Use Docker Compose entirely to orchestrate local development environments (databases, caching, API).
- Configure explicit health checks and `depends_on: condition: service_healthy` to stagger startup times.
- Eliminate "works on my machine" inherently using `docker-compose.yml` for the entire stack's external dependencies (Postgres, Redis, LocalStack).
- Instead of using sleep scripts, write proper `healthcheck` directives for databases and require APIs to configure `depends_on: condition: service_healthy`.
- Use volume mapping for code hot-reloading in development rather than rebuilding images per code change.