-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
executable file
·1621 lines (1571 loc) · 48.2 KB
/
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
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
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%YAML 1.1
---
# THE MEDIA STACK #
# this docker-compose file will get a selection of media downloading/management webapps
# I've tried to simplify getting started as much as possible
# 1. configure your desired variables in the .env file
# 2. run `docker compose up -d` from the folder with this docker-copose.yml folder
# NOTE this process is not fully automated and individual configuration of webapps is still required after docker compose
# basic common configuration for most containers
x-conf: &conf
TZ: ${TZ}
PGID: ${GID}
PUID: ${UID}
# NOTE: this umask env var is mostly used by lsio containers
# docker does not have an option to set umask, see:
# https://github.com/moby/moby/issues/19189
UMASK: "077"
# container restart policy
x-common: &common
restart: always
logging:
driver: "local"
options:
max-file: "5"
max-size: "10m"
# Traefik
x-traefik: &traefik
traefik.enable: "true"
services:
# reverse proxy
traefik:
image: docker.io/traefik:v3.3.1@sha256:e613890bfbc4f599872965345cd0d60b2ec0856f27d02a7ccb134bd681867696
user: ${UID}:${GID}
depends_on:
traefik-socket-proxy:
condition: service_healthy
authelia:
condition: service_healthy
cap_add:
- NET_BIND_SERVICE
command:
- "--global.checknewversion=false"
- "--global.sendanonymoususage=false"
- "--log.level=${TRAEFIK_LOG_LEVEL:-INFO}"
# docker configuration
- "--providers.docker=true"
- "--providers.docker.endpoint=tcp://traefik-socket-proxy:2375"
- "--providers.docker.exposedbydefault=false"
# entrypoints
# HTTP
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
# HTTPS
- "--entrypoints.websecure.address=:443"
- "--entrypoints.websecure.http.tls.certResolver=le"
- "--entrypoints.websecure.http.tls.domains[0].main=${root_domain}"
- "--entrypoints.websecure.http.tls.domains[0].sans=*.${root_domain}"
- "--entryPoints.websecure.http.middlewares=securityHeaders@file"
# DNS challenge
- "--certificatesresolvers.le=true"
- "--certificatesresolvers.le.acme.storage=/traefik/acme.json"
- "--certificatesresolvers.le.acme.dnschallenge=true"
- "--certificatesresolvers.le.acme.dnschallenge.delayBeforeCheck=30"
- "--certificatesresolvers.le.acme.dnschallenge.provider=ovh"
- "--certificatesresolvers.le.acme.email=${letsencrypt_email}"
- "--certificatesresolvers.le.acme.keytype=EC384"
- "--certificatesresolvers.le.acme.dnsChallenge.resolvers=1.1.1.1:53,8.8.8.8:53"
# configs
- "--providers.file.directory=/config/"
# traefik API and dashboard
- "--api=true"
- "--api.dashboard=true"
# traefik healthcheck
- "--ping=true"
- "--ping.manualrouting=true"
# traefik access logs
# - "--accesslog=true"
environment:
OVH_ENDPOINT: ${OVH_ENDPOINT}
OVH_APPLICATION_KEY: ${OVH_APPLICATION_KEY}
OVH_APPLICATION_SECRET: ${OVH_APPLICATION_SECRET}
OVH_CONSUMER_KEY: ${OVH_CONSUMER_KEY}
LEGO_EXPERIMENTAL_CNAME_SUPPORT: "true"
labels:
<<: *traefik
# Dashboard
traefik.http.routers.dashboard.rule: Host(`traefik.${root_domain}`)
traefik.http.routers.dashboard.service: api@internal
traefik.http.routers.dashboard.middlewares: traefik-forward-auth
# Healthcheck
traefik.http.routers.ping.rule: Host(`ping.${root_domain}`)
traefik.http.routers.ping.service: ping@internal
read_only: true
volumes:
- ${docker_data_folder}/traefik/data:/traefik
- ./config/traefik:/config:ro
- ${docker_data_folder}/traefik/plugins-storage:/plugins-storage
tmpfs:
- /tmp:mode=770,size=5M,uid=${UID},gid=${GID}
networks:
- traefik-socket-proxy
- traefik
- homer
- nextcloud-proxy
- robots
- netdata
- scrutiny
- lam
- authelia-proxy
- librespeed
- tandoor
- miniflux-proxy
- lldap
- sftpgo
<<: *common
mem_limit: 500M
memswap_limit: 500M
cpu_count: 4
ports:
- target: 80
published: 80
host_ip: "0.0.0.0"
protocol: tcp
mode: host
- target: 443
published: 443
host_ip: "0.0.0.0"
protocol: tcp
mode: host
- target: 80
published: 80
host_ip: "::"
protocol: tcp
mode: host
- target: 443
published: 443
host_ip: "::"
protocol: tcp
mode: host
healthcheck:
test:
- "CMD"
- "nc"
- "-vz"
- "127.0.0.1"
- "80"
start_period: 3s
interval: 3s
timeout: 3s
retries: 5
traefik-certs-dumper:
<<: *common
depends_on:
traefik:
condition: service_healthy
image: "docker.io/ldez/traefik-certs-dumper:v2.9.3"
user: "${UID}:${GID}"
read_only: true
mem_limit: "50M"
memswap_limit: "50M"
cpu_count: 2
network_mode: none
volumes:
- type: "bind"
source: "${docker_data_folder}/traefik/data/acme.json"
target: "/traefik/acme.json"
read_only: true
- type: "bind"
source: "${docker_data_folder}/traefik-certs-dumper"
target: /data
command:
- "file"
- "--source=/traefik/acme.json"
- "--dest=/data"
- "--watch"
- "--clean"
- "--version=v2"
traefik-socket-proxy: &socket-proxy
<<: *common
image: docker.io/wollomatic/socket-proxy:1.5.3@sha256:e7e5573df597fe726899c21a17f56017512331b7acb7f71490cbbc0b939dfa2b
cpu_count: 2
mem_limit: 50M
memswap_limit: 50M
user: ${UID}:${docker_group_id}
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
entrypoint:
- "/socket-proxy"
- "-loglevel=info"
- "-listenip=0.0.0.0"
- "-shutdowngracetime=5"
- "-watchdoginterval=600"
- "-stoponwatchdog"
- "-allowhealthcheck"
command:
- "-allowfrom=traefik"
# NOTE: https://github.com/wollomatic/traefik-hardened/blob/b2bfcad2a1bf727f2fea33d3d68d3eca9bb1f8da/docker-compose.yaml#L12
- '-allowGET=/v1\..{1,2}/(version|containers/.*|events.*)'
networks:
- traefik-socket-proxy
healthcheck:
test:
- "CMD"
- "./healthcheck"
interval: 10s
timeout: 5s
retries: 2
# watchtower container to update images
# NOTE to update the containers images' watchtower needs to restart the containers this implies some downtime when it does
# NOTE watchtower also updates itself
watchtower:
image: ghcr.io/containrrr/watchtower:1.7.1@sha256:f9086bfda061100361fc2bacf069585678d760d705cf390918ccdbda8a00980b
<<: *common
mem_limit: 50M
memswap_limit: 50M
cpu_count: 2
read_only: true
user: ${UID}:${GID}
environment:
DOCKER_HOST: "tcp://watchtower-socket-proxy:2375"
depends_on:
watchtower-socket-proxy:
condition: service_healthy
networks:
- watchtower
- watchtower-socket-proxy
command:
- "--cleanup"
- "--schedule"
- "0 0 5 * * *"
watchtower-socket-proxy:
<<: *socket-proxy
command:
- "-allowfrom=watchtower"
# NOTE: https://github.com/wollomatic/socket-proxy/blob/6ba2fa6112fb9a115e99de0634b15f1fbe1fb513/examples/docker-compose/watchtower/compose.yaml#L9-L12
- '-allowGET=/v1\..{2}/(containers/.*|images/.*)'
- '-allowPOST=/v1\..{2}/(containers/.*|images/.*|networks/.*)'
- '-allowDELETE=/v1\..{2}/(containers/.*|images/.*)'
networks:
- watchtower-socket-proxy
# Wireguard VPN client
wireguard:
<<: *common
image: docker.io/qmcgaw/gluetun:v3.40.0@sha256:2b42bfa046757145a5155acece417b65b4443c8033fb88661a8e9dcf7fda5a00
cap_add:
- NET_ADMIN
cpu_count: 4
mem_limit: 250M
memswap_limit: 250M
sysctls:
net.ipv6.conf.all.disable_ipv6: 0
volumes:
- type: bind
source: ${docker_data_folder}/gluetun
target: /gluetun
devices:
- /dev/net/tun:/dev/net/tun
networks:
traefik:
aliases:
- qbittorrent
- prowlarr
flaresolverr:
healthcheck:
retries: 25
start_period: 30s
environment:
<<: *conf
LOG_LEVEL: ${GLUETUN_LOG_LEVEL:-info}
VPN_SERVICE_PROVIDER: ${VPN_SERVICE_PROVIDER}
VPN_TYPE: wireguard
SERVER_COUNTRIES: ${VPN_SERVER_COUNTRIES}
WIREGUARD_PRIVATE_KEY: ${WIREGUARD_PRIVATE_KEY}
WIREGUARD_PRESHARED_KEY: ${WIREGUARD_PRESHARED_KEY}
WIREGUARD_ADDRESSES: ${WIREGUARD_ADDRESSES}
FIREWALL_VPN_INPUT_PORTS: ${FIREWALL_VPN_INPUT_PORTS}
# Allow LAN access to other containers
FIREWALL_OUTBOUND_SUBNETS: ${FIREWALL_OUTBOUND_SUBNETS}
DNS_KEEP_NAMESERVER: "on"
VERSION_INFORMATION: "off"
HEALTH_SUCCESS_WAIT_DURATION: "10m"
labels:
<<: *traefik
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_traefik"
# Prowlarr
# service
traefik.http.services.prowlarr.loadbalancer.server.port: "9696"
# Router
traefik.http.routers.prowlarr.rule: Host(`prowlarr.${root_domain}`)
traefik.http.routers.prowlarr.service: prowlarr
# Forward auth
traefik.http.routers.prowlarr.middlewares: authelia@docker
# qBittorrent
# service
traefik.http.services.qbittorrent.loadbalancer.server.port: "8080"
# router
traefik.http.routers.qbittorrent.rule: Host(`torrent.${root_domain}`)
traefik.http.routers.qbittorrent.service: qbittorrent
# Forward auth
traefik.http.routers.qbittorrent.middlewares: authelia@docker
# Disable watchtower for this container because of these issues
# https://github.com/containrrr/watchtower/issues/188
# https://github.com/containrrr/watchtower/issues/1013
com.centurylinklabs.watchtower.enable: "false"
# Torrent client
qbittorrent:
<<: *common
depends_on:
wireguard:
condition: service_healthy
volumes:
- ${docker_data_folder}/qbittorrent:/config
- ${data_folder}:/data
- ${docker_data_folder}/blackhole:/blackhole
- /etc/localtime:/etc/localtime:ro
tmpfs:
- /tmp:mode=770,size=5M,uid=${UID},gid=${GID}
read_only: true
cpu_count: 6
mem_limit: 10G
memswap_limit: 10G
user: ${UID}:${GID}
# NOTE: use `services:` instead of `containers:` because the
# container is defined in the same compose file
network_mode: service:wireguard
image: ghcr.io/guillaumedsde/qbittorrent-distroless@sha256:26397d76f61a3b6b9eb1f89cc3540d5416c63c3112eb4f95f9160c8220e775f7
labels:
com.centurylinklabs.watchtower.depends-on: ${COMPOSE_PROJECT_NAME}-wireguard-1
healthcheck:
start_period: 30s
retries: 10
prowlarr:
<<: *common
image: ghcr.io/elfhosted/prowlarr-develop:1.29.2.4915@sha256:4698c1871e32b8a54c75cd2365cc9fcf290378c53ce6d47766869fd987ca3d81
cpu_count: 4
mem_limit: 3G
memswap_limit: 3G
read_only: true
user: ${UID}:${GID}
network_mode: service:wireguard
depends_on:
wireguard:
condition: service_healthy
volumes:
- ${docker_data_folder}/prowlarr:/config
- ${docker_data_folder}/blackhole:/blackhole
environment:
<<: *conf
labels:
com.centurylinklabs.watchtower.depends-on: ${COMPOSE_PROJECT_NAME}-wireguard-1
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:9696/ping
interval: 10s
timeout: 5s
retries: 8
start_period: 15s
flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:v3.3.21@sha256:1a30e1ad6bb3df626bfe3b9735a6d60e208c475c89bf18be0db4d4b121a3cb0e
<<: *common
# NOTE: default image UID is 1000
user: 1000:1000
cpu_count: 4
mem_limit: 2G
memswap_limit: 2G
environment:
<<: *conf
networks:
- flaresolverr
# radarr, webapp for downloading movies through torrent client
radarr:
image: ghcr.io/elfhosted/radarr:5.17.2.9580@sha256:a4c9f992942bb86bcef575ffa962df9f7851dd6ba4a6a96f6d96773a734e4a4c
<<: *common
cpu_count: 4
mem_limit: 2G
memswap_limit: 2G
read_only: true
user: ${UID}:${GID}
depends_on:
qbittorrent:
condition: service_healthy
prowlarr:
condition: service_healthy
volumes:
- ${docker_data_folder}/radarr:/config
- ${data_folder}:/data
networks:
- traefik
environment:
<<: *conf
labels:
<<: *traefik
traefik.http.routers.radarr.rule: Host(`movies.${root_domain}`)
# service
traefik.http.services.radarr.loadbalancer.server.port: "7878"
# Forward auth
traefik.http.routers.radarr.middlewares: authelia@docker
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:7878/ping
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# sonarr, webapp for downloading series through torrent client
sonarr:
<<: *common
image: ghcr.io/elfhosted/sonarr-develop:4.0.12.2825@sha256:9b9e19e803dcfe046bce129733baf3d28d7b1db0befd366e0ab03829c489e6b9
cpu_count: 4
mem_limit: 2G
memswap_limit: 2G
read_only: true
user: ${UID}:${GID}
depends_on:
qbittorrent:
condition: service_healthy
prowlarr:
condition: service_healthy
volumes:
- ${docker_data_folder}/sonarr:/config
- ${data_folder}:/data
networks:
- traefik
environment:
<<: *conf
# NOTE: fix for read-only filesystems, see:
# https://stackoverflow.com/questions/74447989/failed-to-create-coreclr-hresult-0x80004005#comment131446515_74447989
COMPlus_EnableDiagnostics: "0"
labels:
<<: *traefik
traefik.http.routers.sonarr.rule: Host(`series.${root_domain}`)
# service
traefik.http.services.sonarr.loadbalancer.server.port: "8989"
# Forward auth
traefik.http.routers.sonarr.middlewares: authelia@docker
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:8989/ping
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# lidarr, webapp for downloading music through torrent client
lidarr:
<<: *common
image: ghcr.io/elfhosted/lidarr:2.8.2.4493@sha256:53a87900571644f4f440c3c238e0dbf5de1cea04ae5bd45a8d05833f8b322aea
cpu_count: 4
mem_limit: 2G
memswap_limit: 2G
read_only: true
user: ${UID}:${GID}
depends_on:
qbittorrent:
condition: service_healthy
prowlarr:
condition: service_healthy
volumes:
- ${docker_data_folder}/lidarr:/config
- ${data_folder}:/data
networks:
- traefik
environment:
<<: *conf
# NOTE: fix for read-only filesystems, see:
# https://stackoverflow.com/questions/74447989/failed-to-create-coreclr-hresult-0x80004005#comment131446515_74447989
COMPlus_EnableDiagnostics: "0"
labels:
<<: *traefik
traefik.http.routers.lidarr.rule: Host(`music.${root_domain}`)
# service
traefik.http.services.lidarr.loadbalancer.server.port: "8686"
# Forward auth
traefik.http.routers.lidarr.middlewares: authelia@docker
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:8686/ping
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# readarr, webapp for downloading books through torrent client
readarr:
<<: *common
image: ghcr.io/elfhosted/readarr-develop:0.4.7.2718@sha256:142e732c6b3405414f36e251c1f6faa9cf63a6d3c9b04825dd257c76e4316841
cpu_count: 4
mem_limit: 2G
memswap_limit: 2G
read_only: true
user: ${UID}:${GID}
depends_on:
qbittorrent:
condition: service_healthy
prowlarr:
condition: service_healthy
volumes:
- ${docker_data_folder}/readarr:/config
- ${data_folder}:/data
networks:
- traefik
environment:
<<: *conf
# NOTE: fix for read-only filesystems, see:
# https://stackoverflow.com/questions/74447989/failed-to-create-coreclr-hresult-0x80004005#comment131446515_74447989
COMPlus_EnableDiagnostics: "0"
labels:
<<: *traefik
traefik.http.routers.readarr.rule: Host(`books.${root_domain}`)
# service
traefik.http.services.readarr.loadbalancer.server.port: "8787"
# Forward auth
traefik.http.routers.readarr.middlewares: authelia@docker
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:8787/ping
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# bazarr, webapp for downloading subtitles
bazarr:
<<: *common
depends_on:
radarr:
condition: service_healthy
sonarr:
condition: service_healthy
image: ghcr.io/elfhosted/bazarr:1.5.1@sha256:688fc84002fcb93514cd0223fbec2cca2955fa5df7c2efc7ebe73c5ed4a4d9b5
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
read_only: true
user: ${UID}:${GID}
environment:
<<: *conf
volumes:
- ${docker_data_folder}/bazarr:/config
- ${data_folder}:/data
networks:
- traefik
labels:
<<: *traefik
traefik.http.routers.bazarr.rule: Host(`subtitles.${root_domain}`)
# service
traefik.http.services.bazarr.loadbalancer.server.port: "6767"
# Forward auth
traefik.http.routers.bazarr.middlewares: authelia@docker
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://127.0.0.1:6767
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# automatically extract torrented archives
unpackerr:
image: docker.io/golift/unpackerr:0.14.5@sha256:8493ffc2dd17e0b8a034552bb52d44e003fa457ee407da97ccc69328bce4a815
user: ${UID}:${GID}
read_only: true
cpu_count: 4
mem_limit: 500M
memswap_limit: 500M
<<: *common
networks:
- traefik
volumes:
- ${data_folder}:/data
environment:
UN_SONARR_0_URL: http://sonarr:8989
UN_SONARR_0_API_KEY: ${SONARR_API_KEY}
UN_SONARR_0_PATH: /data/download/series
UN_RADARR_0_URL: http://radarr:7878
UN_RADARR_0_API_KEY: ${RADARR_API_KEY}
UN_RADARR_0_PATH: /data/download/series
UN_LIDARR_0_URL: http://lidarr:8686
UN_LIDARR_0_API_KEY: ${LIDARR_API_KEY}
UN_LIDARR_0_PATH: /data/download/music
# homer is a homepage container
homer:
image: docker.io/b4bz/homer:v24.12.1@sha256:4b44a4a9e3294ccef756275271342661c389ae2936e71ac96b911a139de57757
user: ${UID}:${GID}
cpu_count: 2
mem_limit: 100M
memswap_limit: 100M
read_only: true
<<: *common
networks:
- homer
volumes:
- ${docker_data_folder}/homer/config.yml:/www/assets/config.yml:ro
- ${docker_data_folder}/homer/assets:/www/assets:ro
labels:
<<: *traefik
traefik.http.routers.homer.rule: Host(`home.${root_domain}`) || Host(`${root_domain}`)
# service
traefik.http.services.homer.loadbalancer.server.port: "8080"
# Forward auth
traefik.http.routers.homer.middlewares: authelia@docker
# jellyfin media server
jellyfin:
<<: *common
image: docker.io/jellyfin/jellyfin:10.10.3@sha256:17c3a8d9dddb97789b5f37112840ebf96566442c14d4754193a6c2eb154bc221
user: ${UID}:${GID}
cpu_count: 15
mem_limit: 8G
memswap_limit: 8G
read_only: true
depends_on:
openldap:
condition: service_healthy
tmpfs:
- /config/data/transcodes:mode=770,size=4G,uid=${UID},gid=${GID}
- /tmp:mode=770,size=10M,uid=${UID},gid=${GID}
volumes:
- type: bind
source: ${docker_data_folder}/jellyfin
target: /config
- type: bind
source: ${data_folder}/movies
target: /data/movies
read_only: true
- type: bind
source: ${data_folder}/series
target: /data/series
read_only: true
- type: bind
source: ${data_folder}/music
target: /data/music
read_only: true
- type: bind
source: ${data_folder}/pictures
target: /data/pictures
read_only: true
- type: bind
source: "${data_folder}/Recettes de cuisine"
target: /data/recipes
read_only: true
networks:
- traefik
- ldap
environment:
<<: *conf
# NOTE: required for read only root filesystem, see:
# https://github.com/dotnet/docs/issues/10217#issuecomment-462323277
COMPlus_EnableDiagnostics: "0"
#Uncomment forofficial Jellyfin image:
JELLYFIN_DATA_DIR: /config/data
JELLYFIN_CONFIG_DIR: /config
JELLYFIN_LOG_DIR: /config/log
JELLYFIN_CACHE_DIR: /config/cache
JELLYFIN_FFmpeg__probesize: "2G"
JELLYFIN_FFmpeg__analyzeduration: "800M"
JELLYFIN_PublishedServerUrl: https://jellyfin.${root_domain}
labels:
<<: *traefik
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_traefik"
traefik.http.routers.jellyfin.rule: Host(`jellyfin.${root_domain}`)
# service
traefik.http.services.jellyfin.loadbalancer.server.port: "8096"
jellyseer:
<<: *common
image: docker.io/fallenbagel/jellyseerr:2.2.3@sha256:a324fa4d81cce73116801bee3c50b632f3457c0ca0ad31aa692c640e22f50dea
user: ${UID}:${GID}
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
read_only: true
depends_on:
jellyfin:
condition: service_healthy
radarr:
condition: service_healthy
sonarr:
condition: service_healthy
volumes:
- ${docker_data_folder}/jellyseer:/app/config
tmpfs:
- /tmp:mode=770,size=50M,uid=${UID},gid=${GID}
networks:
- traefik
environment:
<<: *conf
labels:
<<: *traefik
traefik.http.middlewares.ombi-jellyseer-redirect.redirectregex.regex: "^https?://ombi.${root_domain}/(.*)"
traefik.http.middlewares.ombi-jellyseer-redirect.redirectregex.replacement: "https://jellyseer.${root_domain}/"
traefik.http.middlewares.ombi-jellyseer-redirect.redirectregex.permanent: "false"
traefik.http.routers.jellyseer.rule: Host(`jellyseer.${root_domain}`) || Host(`ombi.${root_domain}`)
# service
traefik.http.services.jellyseer.loadbalancer.server.port: "5055"
# Forward auth
traefik.http.routers.jellyseer.middlewares: ombi-jellyseer-redirect
healthcheck:
test:
- CMD
- wget
- --quiet
- --timeout=3
- --tries=1
- --spider
- http://localhost:5055
interval: 5s
timeout: 4s
retries: 4
start_period: 5s
# personal cloud
nextcloud: &nextcloud
depends_on:
nextcloud-postgres:
condition: service_healthy
nextcloud-redis:
condition: service_healthy
ssh:
condition: service_started
openldap:
condition: service_healthy
volumes:
- ${docker_data_folder}/nextcloud:/var/www/html
- ${data_folder}:/data
networks:
- traefik
- nextcloud
- nextcloud-proxy
- ldap
- ssh
environment:
<<: *conf
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: ${NEXTCLOUD_DB_PASSWORD}
POSTGRES_HOST: nextcloud-postgres
REDIS_HOST: nextcloud-redis
REDIS_HOST_PASSWORD: ${NEXTCLOUD_REDIS_PASS}
SMTP_HOST: smtp.sendgrid.net
SMTP_SECURE: ssl
SMTP_PORT: "465"
SMTP_AUTHTYPE: login
SMTP_NAME: apikey
SMTP_PASSWORD: ${SENDGRID_PASS}
MAIL_FROM_ADDRESS: nextcloud
MAIL_DOMAIN: ${root_domain}
labels:
<<: *traefik
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_nextcloud-proxy"
traefik.http.routers.nextcloud.rule: Host(`cloud.${root_domain}`)
traefik.http.routers.nextcloud.middlewares: nextcloud-redirectregex
# service
traefik.http.services.nextcloud.loadbalancer.server.port: "80"
traefik.http.middlewares.nextcloud-redirectregex.redirectregex.permanent: "true"
traefik.http.middlewares.nextcloud-redirectregex.redirectregex.regex: https://cloud.${root_domain}/.well-known/(card|cal)dav
traefik.http.middlewares.nextcloud-redirectregex.redirectregex.replacement: https://cloud.${root_domain}/remote.php/dav/
<<: *common
mem_limit: 4G
memswap_limit: 4G
cpu_count: 8
image: docker.io/nextcloud:30.0-apache
healthcheck:
test: curl -sSf 'http://localhost/status.php' | grep '"installed":true' | grep '"maintenance":false' | grep '"needsDbUpgrade":false' || exit 1
interval: 10s
timeout: 5s
retries: 10
nextcloud-cron:
<<: *nextcloud
labels: {}
entrypoint:
- /cron.sh
healthcheck: {}
# database for nextcloud
nextcloud-postgres:
<<: *common
image: docker.io/postgres:15-bookworm
cpu_count: 2
mem_limit: 2G
memswap_limit: 2G
user: ${UID}:${GID}
read_only: true
environment:
POSTGRES_PASSWORD: ${NEXTCLOUD_DB_PASSWORD}
POSTGRES_USER: nextcloud
tmpfs:
- /run:mode=770,size=5M,uid=${UID},gid=${GID}
- /tmp:mode=770,size=5M,uid=${UID},gid=${GID}
volumes:
- ${docker_data_folder}/nextcloud-postgres:/var/lib/postgresql/data
networks:
- nextcloud
healthcheck: &postgres-healthcheck
test:
- "CMD-SHELL"
- >-
pg_isready
--username="$${POSTGRES_USER}"
--dbname="$${POSTGRES_USER}"
--host=localhost
--port=5432
start_period: 5s
interval: 5s
timeout: 4s
retries: 5
# cache for nextcloud
nextcloud-redis:
<<: *common
cpu_count: 2
mem_limit: 250M
memswap_limit: 250M
read_only: true
user: ${UID}:${GID}
image: docker.io/valkey/valkey:8-alpine
networks:
- nextcloud
volumes:
- ${docker_data_folder}/nextcloud-redis:/data
environment:
REDISCLI_AUTH: "${NEXTCLOUD_REDIS_PASS}"
VALKEY_EXTRA_FLAGS: "--requirepass ${NEXTCLOUD_REDIS_PASS}"
healthcheck: &valkey-healthcheck
test:
- "CMD"
- "valkey-cli"
- "ping"
miniflux:
<<: *common
depends_on:
miniflux-db:
condition: service_healthy
image: ghcr.io/miniflux/miniflux:2.2.4-distroless@sha256:abd42acc4e18944de78fca1166fa97dc24fb167f31dd34cfc87a07a7e1a0f722
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
read_only: true
user: ${UID}:${GID}
networks:
- miniflux
- miniflux-proxy
environment:
BASE_URL: "https://miniflux.${root_domain}/"
AUTH_PROXY_HEADER: "Remote-User"
AUTH_PROXY_USER_CREATION: "true"
RUN_MIGRATIONS: "1"
DATABASE_URL: "postgres://miniflux:${MINIFLUX_DB_PASSWORD}@miniflux-db:5432/miniflux?sslmode=disable"
labels:
<<: *traefik
traefik.docker.network: "${COMPOSE_PROJECT_NAME}_miniflux-proxy"
traefik.http.routers.miniflux.rule: Host(`miniflux.${root_domain}`)
# service
traefik.http.services.miniflux.loadbalancer.server.port: "8080"
# Forward auth
traefik.http.routers.miniflux.middlewares: authelia@docker
miniflux-db:
<<: *common
image: docker.io/postgres:16-bookworm
cpu_count: 2
mem_limit: 2G
memswap_limit: 2G
user: ${UID}:${GID}
read_only: true
environment:
POSTGRES_PASSWORD: ${MINIFLUX_DB_PASSWORD}
POSTGRES_USER: miniflux
tmpfs:
- /run:mode=770,size=5M,uid=${UID},gid=${GID}
- /tmp:mode=770,size=5M,uid=${UID},gid=${GID}
volumes:
- ${docker_data_folder}/miniflux-db:/var/lib/postgresql/data
networks:
- miniflux
healthcheck: *postgres-healthcheck
librespeed:
image: ghcr.io/linuxserver/librespeed:5.4.20240804@sha256:256e01b01048ff97ee06a742ad2619e121e4137a553b89df50f6e376b0e93aff
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
<<: *common
environment:
<<: *conf
volumes:
- "${docker_data_folder}/librespeed:/config"
networks:
- librespeed
labels:
<<: *traefik
traefik.http.routers.librespeed.rule: Host(`librespeed.${root_domain}`)
# service
traefik.http.services.librespeed.loadbalancer.server.port: "80"
# Forward auth
traefik.http.routers.librespeed.middlewares: authelia@docker
tandoor-db:
<<: *common
image: docker.io/postgres:16-bookworm
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
user: ${UID}:${GID}
read_only: true
environment:
POSTGRES_USER: tandoor
POSTGRES_PASSWORD: ${TANDOOR_DB_PASSWORD}
tmpfs:
- /run:mode=770,size=5M,uid=${UID},gid=${GID}
- /tmp:mode=770,size=5M,uid=${UID},gid=${GID}
volumes:
- ${docker_data_folder}/tandoor-db:/var/lib/postgresql/data
networks:
- tandoor
healthcheck: *postgres-healthcheck
tandoor:
<<: *common
image: docker.io/vabene1111/recipes:1.5.27@sha256:05561e2f4b0f808337477bfdf5db087e4e21e7bea77ad05e13ada589bd76701d
cpu_count: 2
mem_limit: 500M
memswap_limit: 500M
user: ${UID}:${GID}
read_only: true
depends_on:
tandoor-db:
condition: service_healthy
environment:
SECRET_KEY: ${TANDOOR_SECRET_KEY}
DB_ENGINE: django.db.backends.postgresql
POSTGRES_HOST: tandoor-db
POSTGRES_PORT: "5432"
POSTGRES_USER: tandoor
POSTGRES_PASSWORD: ${TANDOOR_DB_PASSWORD}
POSTGRES_DB: tandoor
REMOTE_USER_AUTH: "1"
volumes:
- type: bind