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