Use Traefik v2 in README examples and links + use consistent images in examples

This commit is contained in:
Thom Seddon
2020-05-23 16:42:02 +01:00
parent 3345f8ec69
commit 8902cf8735
9 changed files with 59 additions and 84 deletions

View File

@ -3,7 +3,11 @@ version: '3'
services:
traefik:
image: traefik:v2.2
command: --providers.docker
command:
- --providers.docker
# This example uses "global authentication"
- --entryPoints.http.address=:80
- --entrypoints.http.http.middlewares=traefik-forward-auth
ports:
- "8085:80"
- "8086:8080"
@ -11,10 +15,9 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
whoami:
image: emilevauge/whoami
image: containous/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost.com`)"
- "traefik.http.routers.whoami.middlewares=traefik-forward-auth"
traefik-forward-auth:
image: thomseddon/traefik-forward-auth:2
@ -29,7 +32,6 @@ services:
- LOG_LEVEL=debug
labels:
- "traefik.http.routers.traefik-forward-auth.rule=Host(`auth.localhost.com`)"
- "traefik.http.routers.traefik-forward-auth.middlewares=traefik-forward-auth"
- "traefik.http.middlewares.traefik-forward-auth.forwardauth.address=http://traefik-forward-auth:4181"
- "traefik.http.middlewares.traefik-forward-auth.forwardauth.authResponseHeaders=X-Forwarded-User"
- "traefik.http.services.traefik-forward-auth.loadbalancer.server.port=4181"

View File

@ -11,7 +11,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
whoami:
image: emilevauge/whoami
image: containous/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost.com`)"
- "traefik.http.routers.whoami.middlewares=traefik-forward-auth"

View File

@ -11,9 +11,10 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
whoami:
image: emilevauge/whoami
image: containous/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost.com`)"
# This example uses "Individual Authentication"
- "traefik.http.routers.whoami.middlewares=traefik-forward-auth"
traefik-forward-auth: