Created
November 20, 2021 12:20
-
-
Save prappo/39ed9e913796bbd9ad5cad5c403680d8 to your computer and use it in GitHub Desktop.
traefik
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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