Swarm Service Rolling Updates
Swarm also has the ability to perform rolling updates on the services that are running. This means if you have a new update to an application running on your Swarm, you can create a new Docker image and update your service, and Swarm will make sure the new image is up and running successfully before it brings down the old version of your container image.
Performing a rolling update on a service you have running in Swarm is simply a matter of running the service update
command. In the following command, you can see both the new container image name and the service you want to update. Swarm will handle the rest:
docker service update --image <image_name:tag> <service_name>
You'll get the chance very shortly to use all the commands we've explained here. In the following example, you will create a small test application using Django and PostgreSQL. The web application you will be setting up is very basic, so there is no real...