forked from frigi83/traefik-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
243 lines (211 loc) · 8.09 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
version: '3.7'
services:
# =============================================================
#
# TRAEFIK - reverse proxy
#
# =============================================================
reverse-proxy:
image: traefik:latest
command:
# - "--log.level=DEBUG"
# - "--api.dashboard=true"
# - "--api.insecure=true"
- "--providers.file.directory=/FileProvider/"
- "--providers.file.watch=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=web-secure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web-secure.address=:443"
- "--serverstransport.insecureskipverify=true"
- "--certificatesresolvers.certificato.acme.dnschallenge=true"
- "--certificatesresolvers.certificato.acme.dnschallenge.provider=cloudflare"
- "--certificatesresolvers.certificato.acme.dnschallenge.delaybeforecheck=10"
- "--certificatesresolvers.certificato.acme.dnschallenge.resolvers=1.1.1.1:53"
- "--certificatesresolvers.certificato.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
- "--certificatesresolvers.certificato.acme.email=${ACME_EMAIL}"
- "--certificatesresolvers.certificato.acme.storage=acme.json"
environment:
CF_API_EMAIL: ${CF_API_EMAIL}
CF_API_KEY: ${CF_API_KEY}
CLOUDFLARE_EMAIL: ${CLOUDFLARE_EMAIL}
CLOUDFLARE_API_KEY: ${CLOUDFLARE_API_KEY}
container_name: traefik
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.api.rule=Host(`traefik.${DOMAIN}`)"
# - "traefik.http.routers.api.entrypoints=web-secure"
# - "traefik.http.routers.api.tls.certresolver=certificato"
# - "traefik.http.routers.api.tls.domains[0].main=*.${DOMAIN}"
# - "traefik.http.routers.api.service=api@internal"
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
- /volume1/docker/traefik/acme.json:/acme.json
# - /volume1/docker/traefik/FileProvider/:/FileProvider/
restart: always
# =============================================================
#
# WHOAMI - test webserver
#
# =============================================================
whoami:
image: containous/whoami
container_name: whoami
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
- "traefik.http.routers.whoami.entrypoints=web-secure"
- "traefik.http.routers.whoami.tls.certresolver=certificato"
- "traefik.http.routers.whoami.tls.domains[0].main=*.${DOMAIN}"
# =============================================================
# PORTAINER
#
# =============================================================
portainer:
image: portainer/portainer
container_name: portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
# HTTPS traffic
- "traefik.enable=true"
- "traefik.http.routers.portainerS.rule=Host(`portainer.${DOMAIN}`)"
- "traefik.http.routers.portainerS.entrypoints=web-secure"
- "traefik.http.routers.portainerS.tls=true"
- "traefik.http.routers.portainerS.tls.certresolver=certificato"
- "traefik.http.routers.portainerS.tls.domains[0].main=*.${DOMAIN}"
- "traefik.http.routers.portainerS.service=portainerService"
- "traefik.http.services.portainerService.loadBalancer.server.port=9000"
# =============================================================
#
# GRAFANA
#
# =============================================================
grafana:
image: grafana/grafana
container_name: grafana
volumes:
- grafana-storage:/var/lib/grafana
labels:
# HTTPS traffic
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`pm8.${DOMAIN}`)"
- "traefik.http.routers.grafana.entrypoints=web-secure"
- "traefik.http.routers.grafana.tls=true"
- "traefik.http.routers.grafana.tls.certresolver=certificato"
- "traefik.http.routers.grafana.tls.domains[0].main=*.${DOMAIN}"
- "traefik.http.routers.grafana.service=grafanaService"
- "traefik.http.services.grafanaService.loadBalancer.server.port=3000"
environment:
- GF_SERVER_ROOT_URL=https://pm8.${DOMAIN}
- GF_SERVER_DOMAIN=${DOMAIN}
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_USER=${GF_SMTP_USER}
- GF_SMTP_PASSWORD=${GF_SMTP_PASSWORD}
- GF_SMTP_FROM_ADDRESS=${GF_SMTP_FROM_ADDRESS}
- GF_SMTP_FROM_NAME=${GF_SMTP_FROM_NAME}
restart: always
# =============================================================
#
# INFLUXDB
#
# =============================================================
influx:
image: influxdb
container_name: influx
volumes:
- /volume1/docker/pm8_data:/var/lib/influxdb
ports:
- 8086:8086
labels:
# HTTPS traffic
- "traefik.enable=true"
- "traefik.http.routers.influxS.rule=Host(`influx.${DOMAIN}`)"
- "traefik.http.routers.influxS.entrypoints=web-secure"
- "traefik.http.routers.influxS.tls=true"
- "traefik.http.routers.influxS.tls.certresolver=certificato"
- "traefik.http.routers.influxS.tls.domains[0].main=*.${DOMAIN}"
- "traefik.http.routers.influxS.service=influxService"
- "traefik.http.services.influxService.loadBalancer.server.port=8086"
restart: always
environment:
- INFLUXDB_DB=${INFLUXDB_DB}
- INFLUXDB_ADMIN_ENABLED=${INFLUXDB_ADMIN_ENABLED}
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
# =============================================================
#
# NODERED
#
# =============================================================
nodered:
image: nodered/node-red
container_name: nodered
volumes:
- /volume1/docker/nodered:/data
labels:
# HTTPS traffic
- "traefik.enable=true"
- "traefik.http.routers.noderedS.rule=Host(`nodered.${DOMAIN}`)"
- "traefik.http.routers.noderedS.entrypoints=web-secure"
- "traefik.http.routers.noderedS.tls=true"
- "traefik.http.routers.noderedS.tls.certresolver=certificato"
- "traefik.http.routers.noderedS.tls.domains[0].main=*.${DOMAIN}"
- "traefik.http.routers.noderedS.service=noderedService"
- "traefik.http.routers.noderedS.middlewares=noderedMdlS"
- "traefik.http.middlewares.noderedMdlS.basicauth.users=${BASIC_AUTH}"
- "traefik.http.services.noderedService.loadBalancer.server.port=1880"
restart: always
# =============================================================
#
# UNIFI CONTROLLER
#
# =============================================================
unifi:
image: jacobalberty/unifi
container_name: unifi
volumes:
- /volume1/docker/unifi/data:/unifi/data
ports:
- 10001:10001/udp
- 3478:3478/udp
- 8080:8080
labels:
# HTTPS traffic
- "traefik.enable=true"
- "traefik.http.routers.unifiS.rule=Host(`controller.${DOMAIN}`)"
- "traefik.http.routers.unifiS.entrypoints=web-secure"
- "traefik.http.routers.unifiS.tls=true"
- "traefik.http.routers.unifiS.tls.certresolver=certificato"
- "traefik.http.routers.unifiS.tls.domains[0].main=*.${DOMAIN}"
- "traefik.http.routers.unifiS.service=UnifiService"
- "traefik.http.services.UnifiService.loadBalancer.server.port=8443"
- "traefik.http.services.UnifiService.loadbalancer.server.scheme=https"
restart: always
# =============================================================
#
# OUROBOROS
#
# =============================================================
aggiornamento:
container_name: ouroboros
hostname: ouroboros
image: pyouroboros/ouroboros
environment:
- CLEANUP=true
- INTERVAL=3600
- LOG_LEVEL=info
- SELF_UPDATE=true
- IGNORE=mongo influxdb postgres mariadb
- TZ=Europe/Zurich
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
grafana-storage: