swarm full app lifecycle
lab
- create new service
1docker service create -p 8088:80 --name web nginx:1.13
- scale it up to 5
1docker service scale web=5
- update the service by changing the image to a newer version
1docker service update --image nginx:1.14 web
- change published port from 8088 to 9090
tip. you first add a new one and remove the old one at the same time. like so,
1docker service update --publish-rm published=8088,target=80 --publish-add published=9090,target=80 web
- tip update by force
1docker service update --force web
- always remove the services by
1docker service rm <serviceId>
docker healthchecks