# https://github.com/containous/traefik/issues/1037

version: '2'

services:
  traefik:
    container_name: traefik
    image: traefik
    command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /dev/null:/traefik.toml
    labels:
        - "traefik.enable=false"
  whoami:
    image: emilevauge/whoami
    labels:
      - "traefik.backend=whoami"
      - "traefik.frontend.rule=Path: /wai/"
  portainer1:
    image: portainer/portainer
    labels:
      - "traefik.backend=portainer1"
      - "traefik.frontend.rule=Path: /portainer1/"
  portainer2:
    image: portainer/portainer
    labels:
      - "traefik.backend=portainer2"
      - "traefik.frontend.rule=PathStrip: /portainer2/"
  portainer3:
    image: portainer/portainer
    labels:
      - "traefik.backend=portainer3"
      - "traefik.frontend.rule=PathPrefix: /portainer3/"
  portainer4:
    image: portainer/portainer
    labels:
      - "traefik.backend=portainer4"
      - "traefik.frontend.rule=PathPrefixStrip: /portainer4/"
  portainer:
    image: portainer/portainer
    ports:
      - "9000:9000"
    labels:
        - "traefik.enable=false"
