According to traefik documentation:
The dynamic configuration contains everything that defines how the requests are handled by your system. This configuration can change and is seamlessly hot-reloaded , without any request interruption or connection loss.
I'm not able to hot-reload such parameters as they are defined by docker-compose labels. When I update labels in compose file i need to somehow notify traefik/docker about such change, I was not able to find way of doing such thing without restarting/recreating of running container.
What I already tried:
- Simply run
docker-compose up -d
- results in container recreation - According to Docker object labels | Docker Docs there is link titled "Overriding a container’s labels at runtime" - it links to: docker run | Docker Docs i tried to belows but both of them lead to starting new container:
- Run
docker run -l key=valye image container
to update specific label, also results in container restart - Run
docker-compose run -l key=valye service
to update specific label, also results in container restart
I checked this one: Dynamic change Traefik frontend configuration in Docker but It doesn't fit as it don't use swarm.