infrastructure/ansible/roles/traefik/files/traefik.yml
Jake Howard acfd2af7eb
All checks were successful
/ terraform (push) Successful in 37s
/ ansible (push) Successful in 1m28s
Use Gandi as cert provider for traefik
2024-09-14 22:06:42 +01:00

76 lines
1.5 KiB
YAML

entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: web-secure
scheme: https
proxyProtocol:
trustedIPs:
- "{{ wireguard.cidr }}"
- "{{ pve_hosts.internal_cidr }}"
- "{{ tailscale_cidr }}"
web-secure:
address: :443
http:
middlewares:
- floc-block@file
- compress@file
tls:
certresolver: le
domains:
- main: theorangeone.net
sans: "*.theorangeone.net"
- main: jakehoward.tech
sans: "*.jakehoward.tech"
proxyProtocol:
trustedIPs:
- "{{ pve_hosts.ingress.ip }}/32"
forwardedHeaders:
trustedIPs:
- "{{ wireguard.server.ip }}/32" # This is obtained from the connecting `proxy_protocol`
traefik:
address: :8080
ping: {}
providers:
docker:
endpoint: tcp://docker_proxy:2375
watch: true
exposedByDefault: false
network: traefik
file:
directory: /etc/traefik/conf
api:
dashboard: true
insecure: true
certificatesResolvers:
le:
acme:
email: "{{ vault_letsencrypt_email }}"
storage: /etc/traefik/acme.json
dnsChallenge:
provider: gandiv5
delayBeforeCheck: 0
resolvers:
- 9.9.9.9:53
- 149.112.112.112:53
serversTransport:
insecureSkipVerify: true
metrics:
prometheus:
entryPoint: traefik
tls:
options:
default:
minVersion: VersionTLS12
pilot:
dashboard: false