forked from Cambalab/metabase-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtraefik.yml
75 lines (65 loc) · 1.65 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
log:
level: INFO
entryPoints:
web:
# http
address: ":80"
http:
# https://docs.traefik.io/routing/entrypoints/#entrypoint
redirections:
entryPoint:
to: web-secure
web-secure:
# https
address: ":443"
adminer:
address: ":{{ env "ADMINER_PORT" }}"
certificatesResolvers:
letsencrypt:
# https://docs.traefik.io/master/https/acme/#lets-encrypt
acme:
email: "{{ env "CERT_EMAIL"}}"
storage: /etc/traefik/acme/acme.json
# https://docs.traefik.io/master/https/acme/#httpchallenge
httpChallenge:
entryPoint: web
http:
routers:
web-secure-router:
rule: "Host(`{{ env "HOSTNAME"}}`)"
entryPoints:
- web-secure
middlewares:
- csrf
service: metabase
tls:
# https://docs.traefik.io/master/routing/routers/#certresolver
certResolver: letsencrypt
adminer-secure-router:
rule: "Host(`{{ env "HOSTNAME"}}`)"
entryPoints:
- adminer
service: adminer
tls:
# https://docs.traefik.io/master/routing/routers/#certresolver
certResolver: letsencrypt
middlewares:
csrf:
# https://docs.traefik.io/master/middlewares/headers/#hostsproxyheaders
# https://docs.djangoproject.com/en/dev/ref/csrf/#ajax
headers:
hostsProxyHeaders: ["X-CSRFToken"]
services:
metabase:
loadBalancer:
servers:
- url: http://metabase:5000
adminer:
loadBalancer:
servers:
- url: http://adminer:5555
providers:
# https://docs.traefik.io/master/providers/file/
file:
filename: /etc/traefik/traefik.yml
watch: true