Files
sablier/plugins/traefik/examples/docker_classic/docker-compose.yml
Alexis Couvreur 551a146d94 feat: merge service repository into Sablier
Add plugins folder to integrate with multiple reverse proxies

The project is now released as 'Sablier'
2022-10-03 20:27:06 +00:00

46 lines
1.6 KiB
YAML

version: "3.9"
services:
traefik:
image: traefik
command:
- --api=true
- --api.insecure=true
- --pilot.token=$TRAEFIK_PILOT_TOKEN
- --experimental.plugins.sablier.moduleName=github.com/acouvreur/sablier/plugins/traefik
- --experimental.plugins.sablier.version=v1.2.0
- --providers.docker=true
- --providers.file.filename=/etc/traefik/dynamic-config.yml
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- './dynamic-config.yml:/etc/traefik/dynamic-config.yml'
labels:
- traefik.enable=true
sablier:
image: ghcr.io/acouvreur/sablier:1
command:
- --swarmMode=false
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
labels:
- traefik.enable=true
- traefik.http.middlewares.ondemand.plugin.sablier.name=docker_classic_whoami_1
- traefik.http.middlewares.ondemand.plugin.sablier.serviceUrl=http://sablier:10000
- traefik.http.middlewares.ondemand.plugin.sablier.timeout=1m
- traefik.http.services.ondemand.loadbalancer.server.port=10000
whoami:
image: containous/whoami
# Cannot use labels because as soon as the container is stopped, the labels are not treated by Traefik
# The route doesn't exist anymore. Use dynamic-config.yml file instead.
# labels:
# - traefik.enable
# - traefik.http.routers.whoami.rule=PathPrefix(`/whoami`)
# - traefik.http.routers.whoami.middlewares=ondemand