techno-tim / techno-tim.github.io

Open Source, Community Driven, Documentation for Techno Tim YouTube Videos/ Complete with examples for all your copy pasta needs!

Home Page:https://technotim.live

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reducing Downtime when changing configs

angeloluidens opened this issue · comments

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"

Thank you for the suggestion! Nice, rolling deployments! I am going to close this but I will try to include this in future videos!