mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-16 19:21:53 +00:00
Fix traefik
This commit is contained in:
@@ -34,7 +34,7 @@ To deal with these gaps, we need a front-end load-balancer, and in this design,
|
|||||||
|
|
||||||
While it's possible to configure traefik via docker command arguments, I prefer to create a config file (`traefik.toml`). This allows me to change traefik's behaviour by simply changing the file, and keeps my docker config simple.
|
While it's possible to configure traefik via docker command arguments, I prefer to create a config file (`traefik.toml`). This allows me to change traefik's behaviour by simply changing the file, and keeps my docker config simple.
|
||||||
|
|
||||||
Create `/var/data/traefikv2/traefik.toml` as follows:
|
Create `/var/data/config/traefikv2/traefik.toml` as follows:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
[global]
|
[global]
|
||||||
@@ -140,17 +140,9 @@ services:
|
|||||||
# original source IP, which would impact logging. If you don't care about this, you can expose ports the
|
# original source IP, which would impact logging. If you don't care about this, you can expose ports the
|
||||||
# "minimal" way instead
|
# "minimal" way instead
|
||||||
ports:
|
ports:
|
||||||
- target: 80
|
- "80:80"
|
||||||
published: 80
|
- "8080:8080" # traefik dashboard
|
||||||
protocol: tcp
|
- "443:443"
|
||||||
mode: host
|
|
||||||
- target: 443
|
|
||||||
published: 443
|
|
||||||
protocol: tcp
|
|
||||||
mode: host
|
|
||||||
- target: 8080
|
|
||||||
published: 8080
|
|
||||||
protocol: tcp
|
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- /var/data/config/traefikv2:/etc/traefik
|
- /var/data/config/traefikv2:/etc/traefik
|
||||||
@@ -171,7 +163,7 @@ services:
|
|||||||
- "traefik.http.routers.api.tls=true"
|
- "traefik.http.routers.api.tls=true"
|
||||||
- "traefik.http.routers.api.tls.certresolver=main"
|
- "traefik.http.routers.api.tls.certresolver=main"
|
||||||
- "traefik.http.routers.api.service=api@internal"
|
- "traefik.http.routers.api.service=api@internal"
|
||||||
- "traefik.http.services.dummy.loadbalancer.server.port=9999"
|
- "traefik.http.services.api.loadbalancer.server.port=8080"
|
||||||
|
|
||||||
# uncomment this to enable forward authentication on the traefik api/dashboard
|
# uncomment this to enable forward authentication on the traefik api/dashboard
|
||||||
#- "traefik.http.routers.api.middlewares=forward-auth"
|
#- "traefik.http.routers.api.middlewares=forward-auth"
|
||||||
|
|||||||
Reference in New Issue
Block a user