-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
447 lines (417 loc) · 11.8 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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
version: '3.8'
services:
proxz:
image: traefik:3
ports:
- target: 443
published: 443
mode: host
- target: 80
published: 80
mode: host
#- target: 25
# published: 25
# mode: host
- target: 993
published: 993
mode: host
- target: 465
published: 465
mode: host
- target: 587
published: 587
mode: host
- target: 4190
published: 4190
mode: host
environment:
- TZ=$TZ
- CF_DNS_API_TOKEN_FILE=/run/secrets/cloudflare_api_token
- TRAEFIK_API=true
- TRAEFIK_GLOBAL_SENDANONYMOUSUSAGE=false
- TRAEFIK_GLOBAL_CHECKNEWVERSION=false
- TRAEFIK_SERVERSTRANSPORT_INSECURESKIPVERIFY=true
- TRAEFIK_ENTRYPOINTS_imap_ADDRESS=:993
- TRAEFIK_ENTRYPOINTS_imap_PROXYPROTOCOL_TRUSTEDIPS=10.0.0.0/8
# - TRAEFIK_ENTRYPOINTS_smtp_ADDRESS=:25
# - TRAEFIK_ENTRYPOINTS_smtp_PROXYPROTOCOL_TRUSTEDIPS=10.0.0.0/8
- TRAEFIK_ENTRYPOINTS_smtps_ADDRESS=:465
- TRAEFIK_ENTRYPOINTS_smtps_PROXYPROTOCOL_TRUSTEDIPS=10.0.0.0/8
- TRAEFIK_ENTRYPOINTS_msa_ADDRESS=:587
- TRAEFIK_ENTRYPOINTS_msa_PROXYPROTOCOL_TRUSTEDIPS=10.0.0.0/8
- TRAEFIK_ENTRYPOINTS_sieve_ADDRESS=:4190
- TRAEFIK_ENTRYPOINTS_sieve_PROXYPROTOCOL_TRUSTEDIPS=10.0.0.0/8
- TRAEFIK_ENTRYPOINTS_http_ADDRESS=:80
- TRAEFIK_ENTRYPOINTS_http_HTTP_REDIRECTIONS_ENTRYPOINT_TO=https
- TRAEFIK_ENTRYPOINTS_https_ADDRESS=:443
- TRAEFIK_ENTRYPOINTS_https_HTTP_TLS_CERTRESOLVER=letsencrypt
- TRAEFIK_ENTRYPOINTS_https_HTTP_TLS_DOMAINS_0_MAIN=$domain
- TRAEFIK_ENTRYPOINTS_https_HTTP_TLS_DOMAINS_0_SANS=*.$domain
- TRAEFIK_CERTIFICATESRESOLVERS_letsencrypt_ACME_STORAGE=/etc/certz/acme.json
- TRAEFIK_CERTIFICATESRESOLVERS_letsencrypt_ACME_EMAIL=$email
- TRAEFIK_CERTIFICATESRESOLVERS_letsencrypt_ACME_DNSCHALLENGE_PROVIDER=cloudflare
- TRAEFIK_CERTIFICATESRESOLVERS_letsencrypt_ACME_DNSCHALLENGE_RESOLVERS=1.1.1.1:53
- TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT=false
- TRAEFIK_PROVIDERS_DOCKER_DEFAULTRULE=Host(`{{ `{{ index .Labels "com.docker.swarm.service.name" | splitList "_" | last }}` }}.$domain`)
- TRAEFIK_PROVIDERS_FILE_FILENAME=/traefik_file_config.yml
configs:
- source: traefik_file_config
target: /traefik_file_config.yml
secrets:
- cloudflare_api_token
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- certz:/etc/certz
labels:
traefik.enable: 'true'
traefik.http.routers.api.service: 'api@internal'
backup:
image: azinchen/duplicacy:latest
environment:
- TZ=$TZ
- RUN_JOB_IMMEDIATELY=false
- BACKUP_CRON=0 1 * * *
- FILTER_PATTERNS=+git/*;+git-config/*;+uisp/;+uisp/unms/;+uisp/unms/unms-backups/*;+uisp/unms/config-backups/*;-uisp/*;+unifi/;+unifi/backup/*;-unifi/*;-esp/.*
- STORAGE_URL=$BACKUP_STORAGE_URL
- SNAPSHOT_ID=$BACKUP_ID
secrets:
- duplicacy_preferences
volumes:
- backup:/config
- unifi:/data/unifi
- uisp:/data/uisp
- hass:/data/hass
- esp:/data/esp
- git:/data/git
- git-config:/data/git-config
restore:
image: saspus/duplicacy-web:latest
environment:
- TZ=$TZ
- GRP_ID=3875
- USR_ID=3875
volumes:
- restore:/config
labels:
traefik.enable: 'true'
traefik.http.services.restore.loadbalancer.server.port: 3875
traefik.http.routers.restore.entrypoints: 'https'
esp:
image: esphome/esphome:latest
command: ["-q", "dashboard", "/config"]
deploy:
mode: replicated
replicas: 0
restart_policy:
condition: none
environment:
- TZ=$TZ
- ESPHOME_DASHBOARD_USE_PING=true
volumes:
- esp:/config
labels:
traefik.enable: 'true'
traefik.http.services.esp.loadbalancer.server.port: '6052'
traefik.http.routers.esp.entrypoints: 'https'
uisp:
image: nico640/docker-unms:latest
deploy:
endpoint_mode: dnsrr
mode: replicated
replicas: 0
restart_policy:
condition: none
ports:
- target: 2055
published: 2055
protocol: 'udp'
mode: 'host'
environment:
- TZ=$TZ
- QUIET_MODE=1
volumes:
- uisp:/config
labels:
traefik.enable: 'true'
traefik.http.services.uisp.loadbalancer.server.port: 443
traefik.http.services.uisp.loadbalancer.server.scheme: 'https'
traefik.http.routers.uisp.entrypoints: 'https'
unifi:
image: jacobalberty/unifi:v8
user: unifi
environment:
- TZ=$TZ
ports:
- target: 3478
published: 3478
protocol: 'udp'
mode: 'host'
- target: 8080
published: 8080
mode: 'host'
volumes:
- unifi:/unifi/data
- unifi-log:/unifi/logs
labels:
traefik.enable: 'true'
traefik.http.services.unifi.loadbalancer.server.port: 8443
traefik.http.services.unifi.loadbalancer.server.scheme: 'https'
traefik.http.routers.unifi.entrypoints: 'https'
hass:
image: homeassistant/raspberrypi4-64-homeassistant:stable
privileged: true
environment:
- TZ=$TZ
devices:
- /dev/*:/dev/*
volumes:
- hass:/config
labels:
traefik.enable: 'true'
traefik.http.services.hass.loadbalancer.server.port: 8123
traefik.http.routers.hass.entrypoints: 'https'
dash:
image: grafana/grafana-oss:latest
environment:
- TZ=$TZ
volumes:
- grafana:/var/lib/grafana
labels:
traefik.enable: 'true'
traefik.http.routers.dash.entrypoints: 'https'
mon:
image: gcr.io/cadvisor/cadvisor:v0.47.1
deploy:
endpoint_mode: dnsrr
mode: replicated
replicas: 0
restart_policy:
condition: none
environment:
- TZ=$TZ
privileged: true
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/mnt/docker:ro
devices:
- /dev/kmsg
labels:
traefik.enable: 'true'
traefik.http.routers.mon.entrypoints: 'https'
prom:
image: prom/prometheus:latest
deploy:
endpoint_mode: dnsrr
mode: replicated
#replicas: 0
restart_policy:
condition: none
environment:
- TZ=$TZ
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yml
volumes:
- prometheus:/prometheus
labels:
traefik.enable: 'true'
traefik.http.routers.prom.entrypoints: 'https'
collectd-exporter:
image: prom/collectd-exporter:master
command: --collectd.listen-address=":25826"
deploy:
endpoint_mode: dnsrr
mode: replicated
#replicas: 0
restart_policy:
condition: none
ports:
- target: 25826
published: 25826
protocol: 'udp'
mode: 'host'
environment:
- TZ=$TZ
speed:
image: openspeedtest/latest
environment:
- TZ=$TZ
ports:
- target: 3000
published: 3000
mode: 'host'
- target: 3001
published: 3001
mode: 'host'
certdumper:
image: ghcr.io/kereis/traefik-certs-dumper:latest
restart: unless-stopped
depends_on:
- proxz
volumes:
- certz:/traefik:ro
- mail:/output
environment:
- TZ=$TZ
- DOMAIN=$domain
mail:
image: stalwartlabs/mail-server:latest
ports:
- target: 25
published: 25
mode: host
labels:
traefik.enable: 'true'
traefik.http.services.mail.loadbalancer.server.port: 8080
traefik.http.routers.mail.entrypoints: 'https'
# traefik.tcp.routers.smtp.rule: HostSNI(`*`)
# traefik.tcp.routers.smtp.entrypoints: 'smtp'
# traefik.tcp.routers.smtp.service: 'smtp'
# traefik.tcp.services.smtp.loadbalancer.server.port: 25
# traefik.tcp.services.smtp.loadbalancer.proxyProtocol.version: 2
traefik.tcp.routers.jmap.rule: HostSNI(`*`)
traefik.tcp.routers.jmap.tls.passthrough: 'true'
traefik.tcp.routers.jmap.entrypoints: 'https'
traefik.tcp.routers.jmap.service: 'jmap'
traefik.tcp.services.jmap.loadbalancer.server.port: 443
traefik.tcp.services.jmap.loadbalancer.proxyProtocol.version: 2
traefik.tcp.routers.smtps.rule: HostSNI(`*`)
traefik.tcp.routers.smtps.tls.passthrough: 'true'
traefik.tcp.routers.smtps.entrypoints: 'smtps'
traefik.tcp.routers.smtps.service: 'smtps'
traefik.tcp.services.smtps.loadbalancer.server.port: 465
traefik.tcp.services.smtps.loadbalancer.proxyProtocol.version: 2
traefik.tcp.routers.imaps.rule: HostSNI(`*`)
traefik.tcp.routers.imaps.tls.passthrough: 'true'
traefik.tcp.routers.imaps.entrypoints: 'imap'
traefik.tcp.routers.imaps.service: 'imaps'
traefik.tcp.services.imaps.loadbalancer.server.port: 993
traefik.tcp.services.imaps.loadbalancer.proxyProtocol.version: 2
volumes:
- mail:/opt/stalwart-mail
users:
image: lldap/lldap:stable
deploy:
endpoint_mode: dnsrr
ports:
- target: 3890
published: 3890
mode: 'host'
environment:
- TZ=$TZ
- LLDAP_JWT_SECRET_FILE=/run/secrets/LLDAP_JWT_SECRET
- LLDAP_LDAP_USER_PASS_FILE=/run/secrets/LLDAP_LDAP_USER_PASS
- LLDAP_LDAP_BASE_DN=$base_dn
secrets:
- LLDAP_JWT_SECRET
- LLDAP_LDAP_USER_PASS
volumes:
- users:/data
labels:
traefik.enable: 'true'
traefik.http.routers.users.entrypoints: 'https'
traefik.http.services.users.loadbalancer.server.port: 17170
promtail:
image: grafana/promtail:latest
deploy:
endpoint_mode: dnsrr
environment:
- TZ=$TZ
ports:
- target: 514
published: 1514
mode: 'host'
configs:
- source: promtail_config
target: /etc/promtail/config.yml
volumes:
- /mnt/docker/containers:/var/lib/docker/containers:ro
mqtt:
image: eclipse-mosquitto
command: mosquitto -c /mosquitto-no-auth.conf
deploy:
endpoint_mode: dnsrr
environment:
- TZ=$TZ
mqtt_io:
image: flyte/mqtt-io
deploy:
endpoint_mode: dnsrr
mode: replicated
replicas: 0
restart_policy:
condition: none
environment:
- TZ=$TZ
#configs:
#- source: mqtt_io_config
# target: /config.yml
git:
image: gitea/gitea:latest-rootless
deploy:
endpoint_mode: dnsrr
environment:
- TZ=$TZ
ports:
- target: 2222
published: 2222
mode: 'host'
volumes:
- git:/var/lib/gitea
- git-config:/etc/gitea
labels:
traefik.enable: 'true'
traefik.http.services.git.loadbalancer.server.port: 3000
traefik.http.routers.git.entrypoints: 'https'
raw:
image: ghcr.io/izer-xyz/gitea-pages:latest
environment:
- TZ=$TZ
- GITEA_HOST=git:3000
labels:
traefik.enable: 'true'
traefik.http.services.raw.loadbalancer.server.port: 80
traefik.http.routers.raw.entrypoints: 'https'
traefik.http.routers.jmap-client.rule: Host(`m.$domain`)
traefik.http.routers.jmap-client.entrypoints: 'https'
volumes:
certz:
backup:
restore:
esp:
uisp:
unifi:
unifi-log:
driver_opts:
type: tmpfs
device: tmpfs
hass:
grafana:
prometheus:
mail:
users:
git:
git-config:
caddy:
configs:
traefik_file_config:
external: true
prometheus_config:
external: true
promtail_config:
external: true
syslog_ng_config:
external: true
mqtt_io_config:
external: true
secrets:
cloudflare_api_token:
external: true
duplicacy_preferences:
external: true
LLDAP_JWT_SECRET:
external: true
LLDAP_LDAP_USER_PASS:
external: true