Install
openclaw skills install docker-compose-optimizerOptimize Docker Compose configurations for development and production — audit services, networking, volumes, health checks, and resource management.
openclaw skills install docker-compose-optimizerAnalyze Docker Compose files for best practices, security, performance, and production readiness. Audit service configurations, networking, volume mounts, health checks, dependency management, and resource constraints.
"Optimize my docker-compose.yml"
"Check Docker Compose for security issues"
"Review my multi-service setup"
"Make my Compose config production-ready"
cat docker-compose.yml 2>/dev/null || cat docker-compose.yaml 2>/dev/null || cat compose.yml 2>/dev/null
ls docker-compose*.yml 2>/dev/null
latest)unless-stopped for production).env file, not inline.dockerignore configured?depends_on with health check conditionsprofiles)mem_limit, memswap_limit)cpus, cpu_shares)docker-compose.override.yml for dev)## Docker Compose Analysis
**Services:** 6 | **Networks:** 1 (default) | **Volumes:** 3
### 🔴 Issues (2)
1. **No health checks** — 4/6 services missing health checks
`depends_on` without `condition: service_healthy` is unreliable
→ Add healthcheck to db, redis, api, worker
2. **Secrets in compose file** — DB password inline
`POSTGRES_PASSWORD: mypassword123`
→ Move to .env file or Docker secrets
### 🟡 Improvements (4)
3. No memory limits on any service — risk of one service OOM-killing others
4. Using `latest` tag on redis and postgres images
5. Default bridge network — create custom network for service isolation
6. No logging limits — logs will grow unbounded
### ✅ Good Practices
- Named volumes for database persistence
- Restart policy set to `unless-stopped`
- Build context uses multi-stage Dockerfile
- Override file separates dev config