Tech
Stop Copy-Pasting Parts in Docker Compose
Imagine you have a complex microservice. For local development, you need it connected to a message queue, a telemetry collector, and a database. But for your E2E testing, you need a slightly modified version (different env vars, an extra mock dependency, maybe a different port).
Most engineers solve this by maintaining two massive, almost-identical YAML files. It is a nightmare to sync changes.
Or they simply do this:
$ docker compose -f compose.yml -f e2e-compose.yml up --b...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to