Skip to content

Instantly share code, notes, and snippets.

@paulkling
Created October 2, 2017 19:33
Show Gist options
  • Save paulkling/43504b28da72d88e106bdd7d1169ef2f to your computer and use it in GitHub Desktop.
Save paulkling/43504b28da72d88e106bdd7d1169ef2f to your computer and use it in GitHub Desktop.
version: "3.2"
services:
traefik:
image: traefik
command: -c /dev/null --web --docker --docker.watch --docker.swarmmode --docker.domain=traefik --logLevel=DEBUG --accesslogsfile=/dev/stdout
environment:
- "DefaultDomain="
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 8080
published: 8080
protocol: tcp
mode: host
networks:
proxy:
deploy:
mode: global
placement:
constraints:
- node.role == manager
labels:
- "traefik.backend=traefik"
- "traefik.docker.network=proxy"
- "traefik.frontend.entryPoints=http"
- "traefik.frontend.rule=Host:traefik.streamdashboard.com"
- "traefik.port=8080"
whoami:
image: stefanscherer/whoami
networks:
proxy:
deploy:
labels:
- "traefik.backend=whoami"
- "traefik.docker.network=proxy"
- "traefik.frontend.entryPoints=http"
- "traefik.frontend.rule=PathStrip:/whoami/"
- "traefik.port=8080"
portainer:
image: portainer/portainer
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
networks:
proxy:
deploy:
labels:
- "traefik.backend=portainer"
- "traefik.docker.network=proxy"
- "traefik.frontend.entryPoints=http"
- "traefik.frontend.rule=Host:portainer.streamdashboard.com"
- "traefik.port=9000"
networks:
proxy:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment