-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
97 lines (86 loc) · 3.67 KB
/
docker-compose.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
86
87
88
89
90
91
92
93
94
95
96
97
version: '3.3'
services:
traefik:
image: traefik:v2.3.1
networks:
bridge:
ipv4_address: 10.10.10.254
ports:
- 80:80
- 443:443
# - 8080:8080 # Traefik Dashboard - leave disabled!
env_file:
- ${env_files}/traefik.env
secrets:
- traefik_admin_digest
- hetzner_api_key
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${configs}/traefik.yml:/traefik.yml:ro
- ${configs}/traefik:/conf:ro
- ${volumes}/traefik:/data:rw
restart: always
# mem_limit: 1024
labels:
traefik.enable: "true"
traefik.http.routers.http_traefik.rule: "Host(`${traefik_host}`)"
traefik.http.routers.http_traefik.entrypoints: "web"
traefik.http.routers.http_traefik.middlewares: "defaultchain@file,redirectToHttps@file"
traefik.http.routers.https_traefik.rule: "Host(`${traefik_host}`)"
traefik.http.routers.https_traefik.entrypoints: "websecure"
traefik.http.routers.https_traefik.middlewares: "defaultchain@file,adminDigest@file"
traefik.http.routers.https_traefik.service: "traefik"
traefik.http.routers.https_traefik.tls: "true"
traefik.http.routers.https_traefik.tls.certresolver: "hetzner01"
traefik.http.routers.https_traefik.tls.domains[0].main: "${traefik_host}"
traefik.http.services.traefik.loadbalancer.server.port: "${traefik_port}"
traefik.http.services.traefik.loadbalancer.server.scheme: "${traefik_scheme}"
traefik.http.services.traefik.loadbalancer.healthcheck.interval: "10s"
traefik.http.services.traefik.loadbalancer.healthcheck.port: "${traefik_port}"
traefik.http.services.traefik.loadbalancer.healthcheck.scheme: "${traefik_scheme}"
traefik.http.services.traefik.loadbalancer.sticky.cookie: "true"
# # # # # # # # # # # # # # # # # # # #
# redirect:
# image: schmunk42/nginx-redirect
# networks:
# - bridge
# env_file:
# - ${env_files}/redirect.env
# labels:
# traefik.enable: "true"
# traefik.http.routers.http_traefik.rule: "HostRegexp(`{catchall:.*.huber.host}`)"
# traefik.http.routers.http_traefik.entrypoints: "web"
# traefik.http.routers.http_traefik.middlewares: "defaultchain@file"
# traefik.http.routers.https_traefik.rule: "HostRegexp(`{catchall:.*.huber.host}`)"
# traefik.http.routers.https_traefik.entrypoints: "websecure"
# traefik.http.routers.https_traefik.middlewares: "defaultchain@file"
# traefik.http.routers.https_traefik.service: "traefik"
# traefik.http.routers.https_traefik.tls: "true"
# traefik.http.routers.https_traefik.tls.certresolver: "hetzner01"
# traefik.http.routers.https_traefik.tls.domains[0].main: "*.huber.host"
# traefik.http.services.traefik.loadbalancer.server.port: "80"
# traefik.http.services.traefik.loadbalancer.server.scheme: "http"
# traefik.http.services.traefik.loadbalancer.healthcheck.interval: "10s"
# traefik.http.services.traefik.loadbalancer.healthcheck.port: "80"
# traefik.http.services.traefik.loadbalancer.healthcheck.scheme: "http"
# traefik.http.services.traefik.loadbalancer.sticky.cookie: "true"
# certdumper:
# image: humenius/traefik-certs-dumper:latest
# restart: always
# volumes:
# - ${volumes}/traefik/letsencrypt/hetzner01.json:/traefik/acme.json:ro
# - ./certs:/output:rw
# - /var/run/docker.sock:/var/run/docker.sock:ro
# environment:
# DOMAIN: "*.huber.host"
networks:
bridge:
driver: bridge
ipam:
config:
- subnet: 10.10.10.0/16
secrets:
traefik_admin_digest:
file: ${secrets}/traefik_admin_digest.txt
hetzner_api_key:
file: ${secrets}/hetzner_api_key.txt