-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
596 lines (561 loc) · 15.4 KB
/
docker-compose.yml
File metadata and controls
596 lines (561 loc) · 15.4 KB
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
version: '3.8'
services:
proxz:
image: traefik:3
hostname: proxz
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
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.api.service: 'api@internal'
backup:
image: azinchen/duplicacy:latest
hostname: backup
environment:
- TZ=$TZ
- RUN_JOB_IMMEDIATELY=false
- BACKUP_CRON=0 1 * * *
- FILTER_PATTERNS=+pics/;+pics/upload/*;+pics/profile/*;+pics/backups/*;+pics/library/*;-pics/*;+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
- pics:/data/pics
- docs:/data/docs
restore:
image: saspus/duplicacy-web:latest
hostname: restore
environment:
- TZ=$TZ
- GRP_ID=3875
- USR_ID=3875
volumes:
- restore:/config
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.services.restore.loadbalancer.server.port: 3875
traefik.http.routers.restore.entrypoints: 'https'
esp:
image: esphome/esphome:latest
hostname: esp
command: ["-q", "dashboard", "/config"]
deploy:
mode: replicated
replicas: 0
restart_policy:
condition: none
environment:
- TZ=$TZ
- ESPHOME_DASHBOARD_USE_PING=true
volumes:
- esp:/config
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.services.esp.loadbalancer.server.port: '6052'
traefik.http.routers.esp.entrypoints: 'https'
uisp:
image: nico640/docker-unms:latest
hostname: uisp
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
networks:
- proxz
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: ghcr.io/jacobalberty/unifi-docker:v9
hostname: unifi
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
networks:
- proxz
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: ghcr.io/home-assistant/home-assistant:stable
hostname: hass
privileged: true
environment:
- TZ=$TZ
devices:
- /dev/*:/dev/*
volumes:
- hass:/config
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.services.hass.loadbalancer.server.port: 8123
traefik.http.routers.hass.entrypoints: 'https'
dash:
image: grafana/grafana-oss:latest
hostname: dash
environment:
- TZ=$TZ
volumes:
- grafana:/var/lib/grafana
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.dash.entrypoints: 'https'
mon:
image: gcr.io/cadvisor/cadvisor:v0.47.1
hostname: mon
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
networks:
- proxz
devices:
- /dev/kmsg
labels:
traefik.enable: 'true'
traefik.http.routers.mon.entrypoints: 'https'
prom:
image: prom/prometheus:latest
hostname: prom
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
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.prom.entrypoints: 'https'
collectd-exporter:
image: prom/collectd-exporter:master
hostname: collectd-exporter
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
hostname: speed
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
hostname: certdumper
restart: unless-stopped
depends_on:
- proxz
volumes:
- certz:/traefik:ro
- mail:/output
environment:
- TZ=$TZ
- DOMAIN=$domain
mail:
image: stalwartlabs/stalwart:latest
hostname: mail
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
networks:
- proxz
users:
image: lldap/lldap:stable
hostname: users
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
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.users.entrypoints: 'https'
traefik.http.services.users.loadbalancer.server.port: 17170
promtail:
image: grafana/promtail:latest
hostname: promtail
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
hostname: mqtt
command: mosquitto -c /mosquitto-no-auth.conf
deploy:
endpoint_mode: dnsrr
environment:
- TZ=$TZ
mqtt_io:
image: flyte/mqtt-io
hostname: 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
hostname: git
deploy:
endpoint_mode: dnsrr
environment:
- TZ=$TZ
ports:
- target: 2222
published: 2222
mode: 'host'
volumes:
- git:/var/lib/gitea
- git-config:/etc/gitea
networks:
- proxz
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
hostname: raw
environment:
- TZ=$TZ
- GITEA_HOST=git:3000
networks:
- proxz
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'
dns:
image: pihole/pihole:latest
hostname: dns
ports:
- target: 53
published: 53
mode: 'host'
- target: 53
published: 53
protocol: 'udp'
mode: 'host'
environment:
- TZ=$TZ
- FTLCONF_dns_interface=eth1
- FTLCONF_dns_revServers=true,10.0.0.0/8,10.0.0.1,$domain
- FTLCONF_webserver_domain=dns.$domain
volumes:
- pihole:/etc/pihole
- dnsmasq:/etc/dnsmasq.d
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.services.dns.loadbalancer.server.port: 80
traefik.http.routers.dns.entrypoints: 'https'
drop:
image: lscr.io/linuxserver/pairdrop:latest
hostname: drop
environment:
- PUID=1000 # UID to run the application as
- PGID=1000 # GID to run the application as
- WS_FALLBACK=false # Set to true to enable websocket fallback if the peer to peer WebRTC connection is not available to the client.
- RATE_LIMIT=false # Set to true to limit clients to 1000 requests per 5 min.
- RTC_CONFIG=false # Set to the path of a file that specifies the STUN/TURN servers.
- DEBUG_MODE=false # Set to true to debug container and peer connections.
- TZ=$TZ
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.services.drop.loadbalancer.server.port: 3000
traefik.http.routers.drop.entrypoints: 'https'
id:
image: ghcr.io/pocket-id/pocket-id:v1
hostname: id
environment:
- PUID=1001
- PGID=1001
- TZ=$TZ
- APP_URL=https://id.$domain
volumes:
- id:/app/data
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.id.entrypoints: 'https'
traefik.http.services.id.loadbalancer.server.port: 1411
docs:
image: ghcr.io/papra-hq/papra:latest
hostname: docs
environment:
- PUID=1000
- PGID=1000
- TZ=$TZ
- AUTH_SECRET=GkjSvfZn1exjcPk3UWdfGfkwji6viPNuAJOA3dVRQ6p0COpy
- APP_BASE_URL=https://docs.$domain
- INGESTION_FOLDER_IS_ENABLED=true
- |-
AUTH_PROVIDERS_CUSTOMS=[{
"providerId": "${domain}",
"providerName": "${domain}",
"clientId": "${docs_client_id}",
"clientSecret": "${docs_client_secret}",
"type": "oidc",
"discoveryUrl": "https://id.${domain}/.well-known/openid-configuration",
"scopes": ["openid", "profile", "email"]
}]
volumes:
- docs:/app/app-data
- docs-ingest:/app/ingestion
networks:
- proxz
labels:
traefik.enable: 'true'
traefik.http.routers.docs.entrypoints: 'https'
traefik.http.services.docs.loadbalancer.server.port: 1221
volumes:
certz:
backup:
restore:
esp:
uisp:
unifi:
unifi-log:
driver_opts:
type: tmpfs
device: tmpfs
hass:
grafana:
prometheus:
mail:
users:
git:
git-config:
caddy:
pihole:
dnsmasq:
id:
docs:
docs-ingest:
pics:
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
networks:
proxz:
driver: overlay