What You'll Learn
Beginner
- How to use Compose for development
- How to use Compose for production
- Override files and profiles
| Development | Production |
|---|---|
| Bind mount (hot-reload) | Baked into image |
| Debug tools | Stripped out |
| No restart | unless-stopped |
docker-compose.override.ymlyaml
# Auto-merged for dev
services:
api:
volumes:
- .:/app
command: npm run devKey Takeaways
- Dev: bind mounts, debug tools,
restart: no. - Production: baked code, resource limits, security hardening.
docker-compose.override.ymlis auto-merged for dev.- Profiles conditionally include services.
Comments
Comments
Post a Comment