Reducing Downtime when changing configs
angeloluidens opened this issue · comments
Angelo B. J. Luidens commented
You can/should add the following to your docker-compose files for each container to be able to change configuration with minimal downtime of the functionality provided by the container:
deploy:
mode: replicated
replicas: 1
update_config:
order: start-first # get new container running first before removing old, for less downtime
rollback_config:
order: start-first # get new container running first before removing old, for less downtime
placement:
constraints:
- node.role == manager # or e.g. global
labels:
"Your e.g. Traefik labels here. Note the indentation of the tag 'labels:', under deploy"
Techno Tim commented
Thank you for the suggestion! Nice, rolling deployments! I am going to close this but I will try to include this in future videos!