mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-30 17:47:26 +01:00
Add 'plugins/traefik/' from commit 'aef1f9e0dd205ea9cdea9e3ccf11900c5fe79b1f'
git-subtree-dir: plugins/traefik git-subtree-mainline:1a14070131git-subtree-split:aef1f9e0dd
This commit is contained in:
24
plugins/traefik/examples/multiple_containers/README.md
Normal file
24
plugins/traefik/examples/multiple_containers/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Docker swarm
|
||||
|
||||
## Run the demo
|
||||
|
||||
1. `git clone git@github.com:acouvreur/traefik-ondemand-plugin.git`
|
||||
2. `cd traefik-ondemand-plugin/examples/multiple_containers`
|
||||
3. `docker swarm init`
|
||||
4. `export TRAEFIK_PILOT_TOKEN=...`
|
||||
5. `docker stack deploy -c docker-stack.yml DOCKER_SWARM`
|
||||
6. Load `http://localhost/nginx`
|
||||
7. Load `http://localhost/whoami`
|
||||
8. After 1 minute whoami is scaled to 0/0
|
||||
9. After 5 minutes nginx is scaled to 0/0
|
||||
10. `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.
|
||||
Reference in New Issue
Block a user