How will you customize Docker compose file for different environments?

In Docker compose there are two files docker-compose.ymland docker-compose.override.yml. We specify our base configuration in the docker-compose.yml file. For any environment specific customization we use docker-compose.override.yml file. We can specify service in both the files. Dockercompose will merge these files based on the following rules: For single value options, new value replaces the old value. For multi-value options, compose will concatenate the both sets of values. We can also use extends field to extend service configuration to multiple environments. With extends, child services can use the common configuration defined by parent service.