Files
sablier/plugins/traefik/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

65 lines
2.5 KiB
YAML

version: "3.7"
services:
traefik:
image: traefik
entrypoint: sh -c "sed 's/$$TRAEFIK_PILOT_TOKEN/$TRAEFIK_PILOT_TOKEN/' /etc/traefik/traefik-template.yml > /etc/traefik/traefik.yml && traefik"
ports:
- "8000:80"
- "8080:8080"
volumes:
- './traefik_dev.yml:/etc/traefik/traefik-template.yml'
- '/var/run/docker.sock:/var/run/docker.sock'
- '.:/plugins-local/src/github.com/acouvreur/sablier/plugins/traefik'
environment:
- TRAEFIK_PILOT_TOKEN
deploy:
labels:
- traefik.enable=true
- traefik.http.services.traefik.loadbalancer.server.port=8080
sablier:
image: ghcr.io/acouvreur/sablier:feature-merge-repositories
command:
- --swarmMode=true
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
whoami:
image: containous/whoami
deploy:
replicas: 0
labels:
- traefik.enable=true
# If you do not use the swarm load balancer, traefik will evict the service from its pool
# as soon as the service is 0/0. If you do not set that, fallback to dynamic-config.yml file usage.
- traefik.docker.lbswarm=true
- traefik.http.middlewares.ondemand_whoami.plugin.sablier.name=whoami
- traefik.http.middlewares.ondemand_whoami.plugin.sablier://sablier:10000
- traefik.http.middlewares.ondemand_whoami.plugin.sablier
- traefik.http.routers.whoami.middlewares=ondemand_whoami@docker
- traefik.http.routers.whoami.rule=PathPrefix(`/whoami`)
- traefik.http.services.whoami.loadbalancer.server.port=80
nginx:
image: nginx
healthcheck:
test: "true"
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
deploy:
replicas: 0
labels:
- traefik.enable=true
# If you do not use the swarm load balancer, traefik will evict the service from its pool
# as soon as the service is 0/0. If you do not set that, fallback to dynamic-config.yml file usage.
- traefik.docker.lbswarm=true
- traefik.http.middlewares.ondemand_nginx.plugin.sablier.name=nginx
- traefik.http.middlewares.ondemand_nginx.plugin.sablier.serviceurl=http://sablier:10000
- traefik.http.middlewares.ondemand_nginx.plugin.sablier.timeout=5m
- traefik.http.middlewares.ondemand_nginx.plugin.sablier.waitui=false
- traefik.http.routers.nginx.middlewares=ondemand_nginx@docker
- traefik.http.routers.nginx.rule=PathPrefix(`/nginx`)
- traefik.http.services.nginx.loadbalancer.server.port=80