Merges multiple Compose files in order.
Section: Profiles and Overrides
Layer multiple compose files
bash
bash
docker compose -f compose.yaml -f compose.override.yaml up -dExplanation
Useful for base + local override or base + CI override patterns.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Profiles and Overrides
Define optional profiles
Marks a service as optional unless its profile is enabled.
Enable a profile
Starts the stack with a selected optional profile enabled.
Use production-specific files
Applies production overrides like replicas, image tags, and secrets.
Minimal web + db stack
Simple two-service stack with port publishing and environment variables.
Environment as key/value map
Provide container environment values inline in YAML.