Extending Services in Compose
Share Compose configurations between files and projects
Compose supports two methods of sharing common configuration:
- Extending an entire Compose file by using multiple Compose files
- Extending individual services with the
extends
field
Multiple Compose files
Using multiple Compose files enables you to customize a Compose application for different environments or different workflows.
Understanding multiple Compose files
By default, Compose reads two files, a docker-compose.yml
and an optional docker-compose.override.yml
file. By convention, the 登录查看完整内容