docker-composelisted
Install: claude install-skill ajyadav013/claude-kit
# Docker Compose for Local Development
Docker Compose patterns for multi-service orchestration, environment-specific configurations, health checks, and one-image-many-roles deployments from production services.
## When to use
- Setting up local development infrastructure (postgres, redis, kafka, zookeeper, temporal)
- Deploying one image as multiple containers with different roles (server/worker/consumer/cron via MODE env var)
- Configuring health checks for service dependencies (pg_isready, redis-cli ping, kafka-topics.sh)
- Managing environment-specific compose files (docker-compose.yml base, .dev for development, .prod-test for local production simulation, .override for personal overrides)
- Orchestrating services with conditional startup (depends_on with condition: service_healthy)
- Setting up hot-reload development with bind mounts and debug ports
- Using YAML anchors to share common environment variables across services
- Simulating Cloud Run/production deployments locally with prod-test compose files
- Deploying services with profiles for optional infrastructure (monitoring, kafka, temporal)
## Core conventions
### Service Dependencies with Health Checks
**Health check commands per service**: Define `healthcheck` for each infrastructure service using service-specific commands.
**Postgres**: `test: pg_isready -U username` (or `test: ["CMD-SHELL", "pg_isready -U username -d dbname"]`)
**Redis**: `test: redis-cli ping` (or `test: ["CMD", "redis-cli", "ping"]`)
*