Reputation: 7819
Created a micro service application with spring initializer and deployed using docker.
For rolling out the latest changes creating the docker image with the latest code changes
docker stack deploy -c stack.yml mystack
application is running with 2 replicas. Updating the services with docker service update.
docker service update --force service-name
Can anyone please help me with sample stack and best practice to deploy for zero downtime.
Upvotes: 3
Views: 2757
Reputation: 12390
You can find nice text here https://blog.capstonec.com/2018/06/28/zero-downtime-deployment-with-docker-rolling-updates/
Below is an excerpt from the Docker reference documentation which can be found at: https://docs.docker.com/compose/compose-file/#update_config.
Upvotes: 1