title: What's the difference between a stack file and a Compose file?
body: <p>I'm learning about using Docker Compose to deploy applications in multiple containers, across multiple hosts. And I have come across two configuration files - stack file, and Compose file.</p>
  
  <p>From the <a href="https://docs.docker.com/docker-cloud/apps/stack-yaml-reference/" rel="noreferrer">Cloud stack file YAML reference</a>, it states <em>a stack file is a file in YAML format that defines one or more services, similar to a <code>docker-compose.yml</code> file but with a few extensions.</em></p>
  
  <p>And from <a href="https://blog.nimbleci.com/2016/09/14/docker-stacks-and-why-we-need-them/" rel="noreferrer">this post</a>, it states that <em>stacks are very similar to docker-compose except they define services while docker-compose defines containers</em>.</p>
  
  <p>They look very similar, so I am wondering when I would use the stack file, and when to use the Compose file?</p>