mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-24 22:39:25 +01:00
git-subtree-dir: plugins/traefik git-subtree-mainline:1a14070131git-subtree-split:aef1f9e0dd
844 B
844 B
Docker swarm
Run the demo
git clone git@github.com:acouvreur/traefik-ondemand-plugin.gitcd traefik-ondemand-plugin/examples/multiple_containersdocker swarm initexport TRAEFIK_PILOT_TOKEN=...docker stack deploy -c docker-stack.yml DOCKER_SWARM- Load
http://localhost/nginx - Load
http://localhost/whoami - After 1 minute whoami is scaled to 0/0
- After 5 minutes nginx is scaled to 0/0
docker stack rm DOCKER_SWARM
Limitations
Define a middleware per service/container
Due to Traefik plugin, the interface is to provide a config and a ServeHTTP request.
This function has no access to the Traefik configuration, thus no way to determine the container/service associated to the request.
See https://github.com/acouvreur/traefik-ondemand-plugin/issues/8#issuecomment-931940533.