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' - './config.yml:/etc/traefik/config.yml' environment: - TRAEFIK_PILOT_TOKEN deploy: labels: - traefik.enable=true - traefik.http.services.traefik.loadbalancer.server.port=8080 ondemand: image: acouvreur/traefik-ondemand-service:latest volumes: - '/var/run/docker.sock:/var/run/docker.sock' whoami: image: containous/whoami