docker-compose.yml vs docker-stack.yml what difference?

To add to Gabbax0r reply:

Docker Swarm was a standalone component used to cluster Docker engines as a single one.

As of Docker 1.12 the "Swarm" standalone was integrated inside the Docker engine (read the preamble at this page), and Swarm is (or will be) legacy.

To reply to your original question, it is just different names for different cases, but they both are meant to serve the same purpose.

To reply to your comment question, use docker-compose when you have to orchestrate a multi-container app on a single node; if you have to worry about multi-nodes and load-balancing and all this advanced stuff, you better off go with the Swarm.


docker-compose.yml is for the docker-compose tool which is for multi container docker applications on a single docker engine.

its called with

docker-compose up

docker-stack.yml is for the docker swarm tool. (for orchestration and scheduling).

its called with

docker stack