Skip to content

Instantly share code, notes, and snippets.

@prappo
Created November 20, 2021 12:20
Show Gist options
  • Save prappo/39ed9e913796bbd9ad5cad5c403680d8 to your computer and use it in GitHub Desktop.
Save prappo/39ed9e913796bbd9ad5cad5c403680d8 to your computer and use it in GitHub Desktop.
traefik
version: "3.7"
services:
traefik:
image: traefik:v2.0
command: --providers.docker
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
web1:
image: nginx:alpine
labels:
- traefik.http.routers.web1.rule=Host(`web1.localhost`)
web2:
image: containous/whoami
labels:
- traefik.http.routers.web2.rule=Host(`web2.localhost`) || ( Host(`localhost`) && PathPrefix(`/web2`) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment