website/docs: simplify traefik compose example
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
30bb7acb17
commit
a24651437a
|
@ -7,30 +7,15 @@ services:
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
labels:
|
|
||||||
traefik.enable: true
|
|
||||||
traefik.http.routers.api.rule: Host(`traefik.example.com`)
|
|
||||||
traefik.http.routers.api.entrypoints: https
|
|
||||||
traefik.http.routers.api.service: api@internal
|
|
||||||
traefik.http.routers.api.tls: true
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
|
||||||
command:
|
command:
|
||||||
- '--api'
|
- '--api'
|
||||||
- '--log=true'
|
|
||||||
- '--log.level=DEBUG'
|
|
||||||
- '--log.filepath=/var/log/traefik.log'
|
|
||||||
- '--providers.docker=true'
|
- '--providers.docker=true'
|
||||||
- '--providers.docker.exposedByDefault=false'
|
- '--providers.docker.exposedByDefault=false'
|
||||||
- '--entrypoints.http=true'
|
- "--entrypoints.web.address=:80"
|
||||||
- '--entrypoints.http.address=:80'
|
|
||||||
- '--entrypoints.http.http.redirections.entrypoint.to=https'
|
|
||||||
- '--entrypoints.http.http.redirections.entrypoint.scheme=https'
|
|
||||||
- '--entrypoints.https=true'
|
|
||||||
- '--entrypoints.https.address=:443'
|
|
||||||
|
|
||||||
authentik_proxy:
|
authentik-proxy:
|
||||||
image: goauthentik.io/proxy:latest
|
image: goauthentik.io/proxy:latest
|
||||||
ports:
|
ports:
|
||||||
- 9000:9000
|
- 9000:9000
|
||||||
|
@ -46,9 +31,8 @@ services:
|
||||||
traefik.enable: true
|
traefik.enable: true
|
||||||
traefik.port: 9000
|
traefik.port: 9000
|
||||||
traefik.http.routers.authentik.rule: Host(`app.company`) && PathPrefix(`/akprox/`)
|
traefik.http.routers.authentik.rule: Host(`app.company`) && PathPrefix(`/akprox/`)
|
||||||
traefik.http.routers.authentik.entrypoints: https
|
# `authentik-proxy` refers to the service name in the compose file.
|
||||||
traefik.http.routers.authentik.tls: true
|
traefik.http.middlewares.authentik.forwardauth.address: http://authentik-proxy:9000/akprox/auth/traefik
|
||||||
traefik.http.middlewares.authentik.forwardauth.address: http://outpost.company:9000/akprox/auth/traefik
|
|
||||||
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true
|
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true
|
||||||
traefik.http.middlewares.authentik.forwardauth.authResponseHeadersRegex: ^.*$$
|
traefik.http.middlewares.authentik.forwardauth.authResponseHeadersRegex: ^.*$$
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -58,8 +42,6 @@ services:
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: true
|
traefik.enable: true
|
||||||
traefik.http.routers.whoami.rule: Host(`app.company`)
|
traefik.http.routers.whoami.rule: Host(`app.company`)
|
||||||
traefik.http.routers.whoami.entrypoints: https
|
|
||||||
traefik.http.routers.whoami.tls: true
|
|
||||||
traefik.http.routers.whoami.middlewares: authentik@docker
|
traefik.http.routers.whoami.middlewares: authentik@docker
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
Reference in New Issue