-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraefik.yml
85 lines (73 loc) · 2.39 KB
/
traefik.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Writing Logs to a File, in JSON
log:
filePath: "/dev/stdout"
format: common
# level: DEBUG
level: INFO
# https://doc.traefik.io/traefik/operations/ping/
# healthcheck: https://doc.traefik.io/traefik/operations/cli/#healthcheck
ping: {}
# https://doc.traefik.io/traefik/providers/docker/#network
providers:
docker:
endpoint: "tcp://socket-proxy:2375" # https://github.com/Tecnativa/docker-socket-proxy#why
exposedByDefault: false
watch: true # Watch Docker events.
allowEmptyServices: true # Any servers load balancer defined for Docker containers is created regardless of the healthiness of the corresponding containers.
# https://doc.traefik.io/traefik/providers/file/
# allows us to define global middlewares for the web entryPoint
file:
filename: "/etc/traefik/traefik_dynamic_conf.yml"
# https://doc.traefik.io/traefik/observability/metrics/prometheus/
metrics:
prometheus: {}
# https://doc.traefik.io/traefik/operations/dashboard/#insecure-mode
api:
dashboard: true
insecure: true
# https://doc.traefik.io/traefik/migration/v1-to-v2/#http-to-https-redirection-is-now-configured-on-routers
# https://doc.traefik.io/traefik/routing/entrypoints/#http3
entryPoints:
web:
address: ":1080"
http:
redirections:
entrypoint:
to: ":443" # as exposed on the host, otherwise we'd get redirects to https://foo.bar:1443/ URLs ...
scheme: https
websecure:
address: ":1443"
http3:
advertisedPort: 443
http:
# https://doc.traefik.io/traefik/routing/entrypoints/#middlewares
# middlewares are defined in the traefik_dynamic_conf.yml file
middlewares:
- "compress-responses@file"
- "x-served-by@file"
# https://doc.traefik.io/traefik/routing/entrypoints/#tls
tls:
certResolver: letsencrypt
# https://doc.traefik.io/traefik/routing/entrypoints/#address
tcpep:
address: ":51337"
# https://doc.traefik.io/traefik/https/acme/
certificatesResolvers:
letsencrypt:
acme:
# email will be taken from env variable
storage: "/var/log/letsencrypt/acme.json"
httpChallenge:
# used during the challenge
entryPoint: web
# https://doc.traefik.io/traefik/observability/access-logs/
accessLog:
format: json
filters:
statusCodes:
- "200"
- "300-302"
- "400-499"
- "500-599"
retryAttempts: true
minDuration: "10ms"