title: Rollingout updates in docker swarm
body: <p>Created a micro service application with spring initializer and deployed using docker.</p>
  
  <p>For rolling out the latest changes creating the docker image with the latest code changes </p>
  
  <pre><code>docker stack deploy -c stack.yml mystack
  </code></pre>
  
  <p>application is running with 2 replicas. Updating the services with docker service update.</p>
  
  <pre><code>docker service update --force service-name
  </code></pre>
  
  <p>Can anyone please help me with sample stack and best practice to deploy  for zero downtime. </p>