Update traefik to 2.2.0

This removes my custom hack for redirecting users to HTTPS
This commit is contained in:
Jake Howard 2020-03-30 17:59:02 +01:00
parent 7c5968c39a
commit 8fe288549f
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 6 additions and 10 deletions

View file

@ -3,7 +3,7 @@ version: "2.3"
services: services:
traefik: traefik:
container_name: traefik container_name: traefik
image: traefik:v2.1.6 image: traefik:v2.2.0
# command: "--log.level=DEBUG" # command: "--log.level=DEBUG"
network_mode: host network_mode: host
volumes: volumes:

View file

@ -6,9 +6,6 @@ http:
- "10.0.0.0/8" - "10.0.0.0/8"
- "172.16.0.0/12" - "172.16.0.0/12"
- "192.168.0.0/16" - "192.168.0.0/16"
hsts:
redirectScheme:
scheme: https
routers: routers:
hsts: hsts:
@ -16,20 +13,15 @@ http:
rule: PathPrefix(`/`) rule: PathPrefix(`/`)
entryPoints: entryPoints:
- web - web
middlewares:
- hsts
ping: ping:
service: ping@internal service: ping@internal
rule: Host(`traefik.jakehoward.tech`) && Path(`/ping/`) rule: Host(`traefik.jakehoward.tech`) && Path(`/ping/`)
middlewares:
- hsts
tls: tls:
certResolver: le certResolver: le
dashboard: dashboard:
service: dashboard@internal service: dashboard@internal
rule: Host(`traefik.jakehoward.tech`) rule: Host(`traefik.jakehoward.tech`)
middlewares: middlewares:
- hsts
- internal-only - internal-only
tls: tls:
certResolver: le certResolver: le
@ -37,7 +29,6 @@ http:
service: api@internal service: api@internal
rule: Host(`traefik.jakehoward.tech`) && PathPrefix(`/api`) rule: Host(`traefik.jakehoward.tech`) && PathPrefix(`/api`)
middlewares: middlewares:
- hsts
- internal-only - internal-only
tls: tls:
certResolver: le certResolver: le

View file

@ -1,6 +1,11 @@
entryPoints: entryPoints:
web: web:
address: ":80" address: ":80"
http:
redirections:
entryPoint:
to: web-secure
scheme: https
proxyProtocol: proxyProtocol:
trustedIPs: trustedIPs:
- "{{ wireguard.cidr }}" - "{{ wireguard.cidr }}"