How to use different/multiple docker compose files on different servers ? There is a page in official documentation that describes this: https://docs.docker.com/compose/extends/ However, this page only describes first 2 options, and completely skips option 3, which is the most versatile and convenient. It comes down to the following options: 1. docker-compose.override.yml By default, when you execute - - Docker compose reads two files, a and an optional . docker-compose up docker-compose.yml docker-compose.override.yml So I might have only on my local machine, and + - on my dev/prod servers. docker-compose.yml docker-compose.yml docker-compose.override.yml This is not very convenient, and will be difficult to have correct in my repository, especially when my servers will have differences in setup. docker-compose.override.yml 2. Override syntax: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d This is much better, and I can keep multiple different override files, like , , etc docker-compose.prod.yml docker-compose.dev.yml But there are 2 problems with the above approach: files are combined at runtime, so I do not see resulting merged docker-compose.yml file, and can not verify correctness of the merge this syntax does not work in docker swarm mode 3. Docker compose config command docker-compose -f docker-compose.yml -f docker-compose.prod.yml config > docker-compose.stack.yml This works the same exact way as the above 2 options, except it provides me with the resulting yml file - , which I can review and check for correctness. Also now I can use this approach in docker swarm. docker-compose.stack.yml Now I can use it like: docker-compose -f docker-compose.stack.yml up -d Or in swarm: docker stack deploy -c docker-compose.stack.yml mystack Stay Tuned!