Files
sablier/docker-compose.yml
Alexis Couvreur a3be371df5 Using service url
2020-10-20 21:55:59 +02:00

28 lines
992 B
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.yml:/etc/traefik/traefik-template.yml'
- '/var/run/docker.sock:/var/run/docker.sock'
- '.:/plugins/go/src/github.com/acouvreur/traefik-ondemand-plugin'
environment:
- TRAEFIK_PILOT_TOKEN
deploy:
labels:
- traefik.http.services.traefik.loadbalancer.server.port=8080
whoami:
image: containous/whoami
deploy:
labels:
- traefik.http.middlewares.ondemand.plugin.dev.ServiceUrl=http://google.com
- traefik.http.routers.whoami.entrypoints=http
- traefik.http.routers.whoami.middlewares=ondemand@docker
- traefik.http.routers.whoami.rule=PathPrefix(`/whoami`)
- traefik.http.services.whoami.loadbalancer.server.port=80