-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
1723 lines (1666 loc) · 62.7 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
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
########################### NETWORKS
networks:
t3_proxy:
name: t3_proxy
driver: bridge
ipam:
config:
- subnet: $TRAEFIK_NETWORK
default:
driver: bridge
# Common environment values
x-environment: &default-tz-puid-pgid
TZ: $TZ
PUID: $PUID
PGID: $PGID
# Keys common to some of the services in basic-services.txt
x-common-keys-core: &common-keys-core
networks:
- t3_proxy
security_opt:
- no-new-privileges:true
restart: always
# Keys common to some of the dependent services/apps
x-common-keys-apps: &common-keys-apps
networks:
- t3_proxy
security_opt:
- no-new-privileges:true
restart: unless-stopped
# SECRETS
secrets:
plex_claim:
file: $DOCKERDIR/secrets/plex_claim
plex_token:
file: $DOCKERDIR/secrets/plex_token
mysql_root_password:
file: $DOCKERDIR/secrets/mysql_root_password
teslamate_db_name:
file: $DOCKERDIR/secrets/teslamate_db_name
teslamate_db_user:
file: $DOCKERDIR/secrets/teslamate_db_user
teslamate_db_password:
file: $DOCKERDIR/secrets/teslamate_db_password
teslamate_ek:
file: $DOCKERDIR/secrets/teslamate_ek
transmission_rpc_username:
file: $DOCKERDIR/secrets/transmission_rpc_username
transmission_rpc_password:
file: $DOCKERDIR/secrets/transmission_rpc_password
pia_username:
file: $DOCKERDIR/secrets/pia_username
pia_password:
file: $DOCKERDIR/secrets/pia_password
htpasswd:
file: $DOCKERDIR/secrets/htpasswd
http_password:
file: $DOCKERDIR/secrets/http_password
http_username:
file: $DOCKERDIR/secrets/http_username
nc_db_name:
file: $DOCKERDIR/secrets/nc_db_name
nc_db_user:
file: $DOCKERDIR/secrets/nc_db_user
nc_db_password:
file: $DOCKERDIR/secrets/nc_db_password
nc_admin_user:
file: $DOCKERDIR/secrets/nc_admin_user
nc_admin_password:
file: $DOCKERDIR/secrets/nc_admin_password
grafana_admin_user:
file: $DOCKERDIR/secrets/grafana_admin_user
grafana_pw:
file: $DOCKERDIR/secrets/grafana_pw
grafana_admin_pw:
file: $DOCKERDIR/secrets/grafana_admin_pw
cf_email:
file: $DOCKERDIR/secrets/cf_email
cf_api_key:
file: $DOCKERDIR/secrets/cf_api_key
traefik_forward_auth:
file: $DOCKERDIR/secrets/traefik_forward_auth
guac_db_name:
file: $DOCKERDIR/secrets/guac_db_name
guac_mysql_user:
file: $DOCKERDIR/secrets/guac_mysql_user
guac_mysql_password:
file: $DOCKERDIR/secrets/guac_mysql_password
peerport:
file: $DOCKERDIR/pia/pia-shared/port.dat
github_token:
file: $DOCKERDIR/secrets/github_token
trakt_clientid:
file: $DOCKERDIR/secrets/trakt_clientid
trakt_clientsecret:
file: $DOCKERDIR/secrets/trakt_clientsecret
trakt_pin:
file: $DOCKERDIR/secrets/trakt_pin
glances_password:
file: $DOCKERDIR/secrets/glances_password
glances_pass:
file: $DOCKERDIR/secrets/glances_pass
portainer_key:
file: $DOCKERDIR/secrets/portainer_key
radarr_api:
file: $DOCKERDIR/secrets/radarr_api_key
sonarr_api:
file: $DOCKERDIR/secrets/sonarr_api_key
lidarr_api:
file: $DOCKERDIR/secrets/lidarr_api_key
bazarr_api:
file: $DOCKERDIR/secrets/bazarr_api_key
mylar_api:
file: $DOCKERDIR/secrets/mylar_api_key
readarr_api:
file: $DOCKERDIR/secrets/readarr_api_key
prowlarr_api:
file: $DOCKERDIR/secrets/prowlarr_api_key
tautulli_api:
file: $DOCKERDIR/secrets/tautulli_api_key
sabnzbd_api:
file: $DOCKERDIR/secrets/sabnzbd_api_key
ombi_api:
file: $DOCKERDIR/secrets/ombi_api_key
omdb_api:
file: $DOCKERDIR/secrets/omdb_api_key
tmdb_api:
file: $DOCKERDIR/secrets/tmdb_api_key
mdblist_api:
file: $DOCKERDIR/secrets/mdblist_api_key
hpusername:
file: $DOCKERDIR/secrets/hpusername
hppassword:
file: $DOCKERDIR/secrets/hppassword
########################### SERVICES
services:
# Traefik 3 - Reverse Proxy
traefik:
<<: *common-keys-core
image: traefik:3.2
container_name: traefik
profiles: ["infra", "all"]
command: # CLI arguments
- --global.checkNewVersion=true
- --global.sendAnonymousUsage=false
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --entryPoints.traefik.address=:8080
# - --entryPoints.ping.address=:8081
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --api=true
- --api.dashboard=true
# - --api.insecure=true
# - --ping=true
# - --serversTransport.insecureSkipVerify=true
- --entrypoints.https.forwardedHeaders.trustedIPs=$CLOUDFLARE_IPS,$IPWHITELIST
- --log=true
- --log.filePath=/logs/traefik.log
- --log.level=INFO # (Default: error) DEBUG, INFO, WARN, ERROR, FATAL, PANIC
- --accessLog=true
- --accessLog.filePath=/logs/access.log
- --accessLog.bufferingSize=100 # Configuring a buffer of 100 lines
- --accessLog.filters.statusCodes=204-299,400-499,500-599
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock # Disable for Socket Proxy. Enable otherwise.
#- --providers.docker.endpoint=tcp://socket-proxy:2375 # Enable for Socket Proxy. Disable otherwise.
- --providers.docker.exposedByDefault=false
- --providers.docker.network=t3_proxy
# - --providers.docker.swarmMode=false # Traefik v2 Swarm
# - --providers.swarm.endpoint=tcp://127.0.0.1:2377 # Traefik v3 Swarm
- --entrypoints.websecure.http.tls=true
- --entrypoints.websecure.http.tls.options=tls-opts@file
# Add dns-cloudflare as default certresolver for all services. Also enables TLS and no need to specify on individual services
- --entrypoints.websecure.http.tls.certresolver=dns-cloudflare
- --entrypoints.websecure.http.tls.domains[0].main=$DOMAINNAME
- --entrypoints.websecure.http.tls.domains[0].sans=*.$DOMAINNAME
#- --entrypoints.websecure.http.tls.domains[1].main=$DOMAINNAME_1
#- --entrypoints.websecure.http.tls.domains[1].sans=*.$DOMAINNAME_1
- --providers.file.directory=/rules # Load dynamic configuration from one or more .toml or .yml files in a directory
- --providers.file.watch=true # Only works on top level files in the rules folder
# - --certificatesResolvers.dns-cloudflare.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory # LetsEncrypt Staging Server - uncomment when testing
- --certificatesResolvers.dns-cloudflare.acme.storage=/acme.json
- --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.provider=cloudflare
- --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.resolvers=1.1.1.1:53,1.0.0.1:53
- --certificatesResolvers.dns-cloudflare.acme.dnsChallenge.delayBeforeCheck=90 # To delay DNS check and reduce LE hitrate
# - --experimental.plugins.cloudflarewarp.modulename=github.com/BetterCorp/cloudflarewarp
# - --experimental.plugins.cloudflarewarp.version=v1.3.3
networks:
t3_proxy:
ipv4_address: $TRAEFIK_IP
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
volumes:
- $DOCKERDIR/traefik3/rules:/rules
- /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy instead for improved security
- $DOCKERDIR/traefik3/acme/acme.json:/acme.json # cert location - you must touch this file and change permissions to 600
- $DOCKERDIR/traefik3/logs:/logs # for fail2ban - make sure to touch file before starting container
environment:
<<: *default-tz-puid-pgid
DOMAINNAME: $DOMAINNAME
CF_API_EMAIL_FILE: /run/secrets/cf_email
CF_API_KEY_FILE: /run/secrets/cf_api_key
HTPASSWD_FILE: /run/secrets/htpasswd
secrets:
- cf_email
- cf_api_key
- htpasswd
labels:
- "traefik.enable=true"
# HTTP Routers
- "traefik.http.routers.traefik-rtr.entrypoints=websecure"
- "traefik.http.routers.traefik-rtr.rule=Host(`traefik.$DOMAINNAME`)"
## Services - API
- "traefik.http.routers.traefik-rtr.service=api@internal"
## Middlewares
- "traefik.http.routers.traefik-rtr.middlewares=chain-oauth@file"
# Google OAuth - Single Sign On using OAuth 2.0
# https://hub.docker.com/r/thomseddon/traefik-forward-auth
# https://www.smarthomebeginner.com/google-oauth-with-traefik-docker/
oauth:
<<: *common-keys-core
image: reddthebamf/traefik-forward-auth:1.23.2-alpine-amd64 #thomseddon/traefik-forward-auth
container_name: oauth
profiles: ["infra", "all"]
volumes:
- $DOCKERDIR/oauth/rules:/rules
environment:
- CONFIG=/config
- COOKIE_DOMAIN=$DOMAINNAME
- INSECURE_COOKIE=false
- AUTH_HOST=oauth.$DOMAINNAME
- URL_PATH=/_oauth
- LOG_LEVEL=warn # set to trace while testing bypass rules
- LOG_FORMAT=text
- LIFETIME=86400 # 1 day
- DEFAULT_ACTION=auth
- DEFAULT_PROVIDER=google
secrets:
- source: traefik_forward_auth
target: /config
labels:
- "traefik.enable=true"
- "traefik.http.routers.oauth-rtr.entrypoints=websecure"
- "traefik.http.routers.oauth-rtr.rule=Host(`oauth.$DOMAINNAME`)"
- "traefik.http.routers.oauth-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.oauth-rtr.service=oauth-svc"
- "traefik.http.services.oauth-svc.loadbalancer.server.port=4181"
# Portainer - WebUI for Containers
portainer:
<<: *common-keys-core
image: portainer/portainer-ce
container_name: portainer
profiles: ["infra", "all"]
command: -H unix:///var/run/docker.sock
# ports:
# - "$PORTAINER_PORT:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- $DOCKERDIR/portainer/data:/data
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer-rtr.entrypoints=websecure"
- "traefik.http.routers.portainer-rtr.rule=Host(`portainer.$DOMAINNAME`)"
- "traefik.http.routers.portainer-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.portainer-rtr.service=portainer-svc"
- "traefik.http.services.portainer-svc.loadbalancer.server.port=9000"
# Homepage - Application Dashboard
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "all"]
networks:
- t3_proxy
# ports:
# - "$HOMEPAGE_PORT:3000"
volumes:
- $DOCKERDIR/homepage:/app/config
- /var/run/docker.sock:/var/run/docker.sock:ro # pass local proxy
- $USERDIR/media:/media
environment:
TZ: $TZ
PUID: $PUID
PGID: 999
HOMEPAGE_VAR_DOMAINNAME: $DOMAINNAME
HOMEPAGE_VAR_HDHOMERUN_IP: $HDHOMERUN_IP
HOMEPAGE_VAR_SERVER_IP: $SERVER_IP
HOMEPAGE_VAR_ROUTER_IP: $ROUTER_IP
HOMEPAGE_VAR_PLEX_PORT: $PLEX_PORT
HOMEPAGE_VAR_HOMEPAGE_LABEL: $HOMEPAGE_LABEL
HOMEPAGE_VAR_HOMEPAGE_LAT: $HOMEPAGE_LAT
HOMEPAGE_VAR_HOMEPAGE_LONG: $HOMEPAGE_LONG
HOMEPAGE_VAR_HOMEPAGE_TZ: $TZ
HOMEPAGE_FILE_HPUSERNAME: /run/secrets/hpusername
HOMEPAGE_FILE_HPPASSWORD: /run/secrets/hppassword
HOMEPAGE_FILE_GLANCES_PASS: /run/secrets/glances_pass
HOMEPAGE_FILE_PLEX_TOKEN: /run/secrets/plex_token
HOMEPAGE_FILE_PORTAINER_KEY: /run/secrets/portainer_key
HOMEPAGE_FILE_TRANSMISSION_RPC_PASSWORD: /run/secrets/transmission_rpc_password
HOMEPAGE_FILE_TRANSMISSION_RPC_USERNAME: /run/secrets/transmission_rpc_username
HOMEPAGE_FILE_RADARR_API: /run/secrets/radarr_api
HOMEPAGE_FILE_SONARR_API: /run/secrets/sonarr_api
HOMEPAGE_FILE_LIDARR_API: /run/secrets/lidarr_api
HOMEPAGE_FILE_PROWLARR_API: /run/secrets/prowlarr_api
HOMEPAGE_FILE_TAUTULLI_API: /run/secrets/tautulli_api
HOMEPAGE_FILE_SABNZBD_API: /run/secrets/sabnzbd_api
HOMEPAGE_FILE_BAZARR_API: /run/secrets/bazarr_api
HOMEPAGE_FILE_READARR_API: /run/secrets/readarr_api
HOMEPAGE_FILE_MYLAR_API: /run/secrets/mylar_api
secrets:
- hpusername
- hppassword
- portainer_key
- glances_pass
- plex_token
- transmission_rpc_password
- transmission_rpc_username
- sabnzbd_api
- radarr_api
- sonarr_api
- lidarr_api
- prowlarr_api
- tautulli_api
- bazarr_api
- ombi_api
- readarr_api
- mylar_api
labels:
- "traefik.enable=true"
# HTTP Routers
- "traefik.http.routers.homepage-rtr.entrypoints=websecure"
- "traefik.http.routers.homepage-rtr.rule=Host(`www.$DOMAINNAME`)"
# Middlewares
- "traefik.http.routers.homepage-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.homepage-rtr.service=homepage-svc"
- "traefik.http.services.homepage-svc.loadbalancer.server.port=3000"
# MariaDB - MySQL Database
mariadb:
image: linuxserver/mariadb
container_name: mariadb
hostname: mariadb
networks:
- default
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "all"]
# ports:
# - "$MARIADB_PORT:3306"
volumes:
- $DOCKERDIR/mariadb/data:/config
environment:
<<: *default-tz-puid-pgid
FILE__MYSQL_ROOT_PASSWORD: /run/secrets/mysql_root_password
secrets:
- mysql_root_password
# phpMyAdmin - Database management
phpmyadmin:
<<: *common-keys-apps
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
profiles: ["infra", "all"]
networks:
- default
- t3_proxy
# ports:
# - "$PHPMYADMIN_PORT:80"
environment:
<<: *default-tz-puid-pgid
PMA_HOST: $MARIADB_HOST
PMA_PORT: $MARIADB_PORT
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root_password
secrets:
- mysql_root_password
labels:
- "traefik.enable=true"
- "traefik.http.routers.phpmyadmin-rtr.entrypoints=websecure"
- "traefik.http.routers.phpmyadmin-rtr.rule=Host(`pma.$DOMAINNAME`)"
- "traefik.http.routers.phpmyadmin-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.phpmyadmin-rtr.service=phpmyadmin-svc"
- "traefik.http.services.phpmyadmin-svc.loadbalancer.server.port=80"
# Guacamole - Remote desktop, SSH, on Telnet on any HTML5 Browser
# Create all databases and tables first
guacamole:
image: guacamole/guacamole
container_name: guacamole
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "remote"]
networks:
- t3_proxy
- default
volumes:
- $DOCKERDIR/guacamole/temp:/temp
# ports:
# - "$GUACAMOLE_PORT:8080"
environment:
<<: *default-tz-puid-pgid
REMOTE_IP_VALUE_ENABLED: true
GUACD_HOSTNAME: guacd
MYSQL_HOSTNAME: $MARIADB_HOST
MYSQL_PORT: $MARIADB_PORT
MYSQL_DATABASE_FILE: /run/secrets/guac_db_name
MYSQL_USER_FILE: /run/secrets/guac_mysql_user
MYSQL_PASSWORD_FILE: /run/secrets/guac_mysql_password
secrets:
- guac_db_name
- guac_mysql_user
- guac_mysql_password
labels:
- "traefik.enable=true"
- "traefik.http.routers.guacamole-rtr.entrypoints=websecure"
- "traefik.http.routers.guacamole-rtr.rule=Host(`guac.$DOMAINNAME`)"
- "traefik.http.routers.guacamole-rtr.middlewares=chain-oauth@file,add-guacamole"
- "traefik.http.middlewares.add-guacamole.addPrefix.prefix=/guacamole"
- "traefik.http.routers.guacamole-rtr.service=guacamole-svc"
- "traefik.http.services.guacamole-svc.loadbalancer.server.port=8080"
# Guacamole Daemon - Needed for Guacamole
guacd:
# <<: *common-keys-core
image: guacamole/guacd
container_name: guacd
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "remote"]
# Cloudflare DDNS - Dynamic DNS Updater
cloudddns:
<<: *common-keys-core
image: reddthebamf/cloudflare-ddns:22-alpine3.19 #joshava/cloudflare-ddns
container_name: cloudddns
profiles: ["infra", "all"]
volumes:
- $DOCKERDIR/cloudflare-ddns/config.yaml:/app/config.yaml
environment:
<<: *default-tz-puid-pgid
DOMAINNAME: $DOMAINNAME
# Mosquitto - MQTT Broker
# Create mosquitto.conf, passwd, mosquitto.log files and set permissions to 775 user:docker
# dexec mosquitto /bin/sh -> mosquitto_passwd -b /mosquitto/config/passwd username passwd
mosquitto:
image: eclipse-mosquitto
container_name: mosquitto
networks:
- default
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "all"]
# ports:
# - "$MOSQUITTO_HTTP_PORT:1883" #http
# - "9001:9001" #websockets
# - "$MOSQUITTO_HTTPS_PORT:8883" #https
volumes:
- $DOCKERDIR/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf
- $DOCKERDIR/mosquitto/data:/mosquitto/data
- $DOCKERDIR/mosquitto/config/passwd:/mosquitto/config/passwd
- $DOCKERDIR/shared:/shared
environment:
<<: *default-tz-puid-pgid
############################# DATABASE
# Postgres - Database for TeslaMate
postgres:
image: postgres:15
container_name: postgres
networks:
- default
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["infra", "all"]
volumes:
- $DOCKERDIR/postgres:/var/lib/postgresql/data
environment:
<<: *default-tz-puid-pgid
POSTGRES_DB__FILE: /run/secrets/teslamate_db_name
POSTGRES_USER__FILE: /run/secrets/teslamate_db_user
POSTGRES_PASSWORD__FILE: /run/secrets/teslamate_db_password
secrets:
- teslamate_db_name
- teslamate_db_user
- teslamate_db_password
# POSTGRES_MULTIPLE_DATABASES: statping-{{ statping_db_pass }},teslamate-{{ teslamate_db_pass }}
# Gluetun - VPN Client for Docker Containers and More
# Gluetun only for use by torrent clients + on demand lan devices.
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["vpn"]
networks:
- t3_proxy
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
dns:
- 1.1.1.1
- 1.0.0.1
ports:
- "8081:8080" # Exposing qBittorrent through Docker Host LAN IP
# # - 8888:8888/tcp # HTTP proxy
# # - 8388:8388/tcp # Shadowsocks
# # - 8388:8388/udp # Shadowsocks
volumes:
- $DOCKERDIR/gluetun:/gluetun
- $DOCKERDIR/gluetun/portforward:/tmp/gluetun/
environment:
TZ: $TZ
# Wireguard
# VPN_SERVICE_PROVIDER: surfshark
# VPN_TYPE: wireguard
# WIREGUARD_PRIVATE_KEY: $SURFSHARK_WG_PRIVATE_KEY
# WIREGUARD_ADDRESSES: 10.14.0.2/16
# SERVER_COUNTRIES: Netherlands
# OpenVPN
VPN_SERVICE_PROVIDER: private internet access
VPN_TYPE: openvpn
VPN_PORT_FORWARDING: on
#PRIVATE_INTERNET_ACCESS_VPN_PRIVATE_INTERNET_ACCESS_VPN_PORT_FORWARDING_STATUS_FILE: /gluetun/forwarded_port
VPN_PORT_FORWARDING_STATUS_FILE: /tmp/gluetun/forwarded_port
VPN_PORT_FORWARDING_USERNAME_SECRETFILE: /run/secrets/openvpn_user
VPN_PORT_FORWARDING_PASSWORD_SECRETFILE: /run/secrets/openvpn_password
OPENVPN_CONFIG: Argentina
# DNS_SERVER: 1.0.0.1, 1.1.1.1
OPENVPN_OPTS: --inactive 3600 --ping 10 --ping-exit 60
secrets:
- source: pia_username
target: /run/secrets/openvpn_user
- source: pia_password
target: /run/secrets/openvpn_password
labels:
- "traefik.enable=true"
# HTTP Routers
- "traefik.http.routers.gluetun-qbittorrent-rtr.entrypoints=websecure"
- "traefik.http.routers.gluetun-qbittorrent-rtr.rule=Host(`qbit.$DOMAINNAME`)" # qBittorrent
# Middlewares
- "traefik.http.routers.gluetun-qbittorrent-rtr.middlewares=chain-oauth@file" # qBittorrent
# HTTP Services
- "traefik.http.routers.gluetun-qbittorrent-rtr.service=gluetun-svc" # qBittorrent
- "traefik.http.services.gluetun-svc.loadbalancer.server.port=8080" # qBittorrent
# qBittorrent - Torrent downloader
# Needs trailing / if using PathPrefixStrip
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
security_opt:
- no-new-privileges:true
restart: unless-stopped
profiles: ["media", "downloads"]
network_mode: "service:gluetun"
# ports:
# - "8081:8080" # Explosed via gluetun. 8081 because crowdsec is using port 8080
volumes:
- $DOCKERDIR/qbittorrent:/config
- $DOCKERDIR/gluetun/portforward:/tmp/gluetun/
- $DOWNLOAD_DIR:/downloads # Ensure that downloads folder is set to /data/downloads in qBittorrent
environment:
TZ: $TZ
PUID: $PUID
PGID: $PGID
UMASK_SET: 002
TORRENTING_PORT_FILE: /tmp/gluetun/forwarded_port
healthcheck: # https://github.com/qdm12/gluetun/issues/641#issuecomment-933856220
test: "curl -sf https://example.com || exit 1"
interval: 1m
timeout: 10s
retries: 1
labels: # Traefik labels added via glueten
- "deunhealth.restart.on.unhealthy=true"
############################# DOWNLOADERS
# TransmissionBT - Torrent Downloader
transmission:
<<: *common-keys-apps
# image: linuxserver/transmission:latest
image: haugene/transmission-openvpn
container_name: transmission
profiles: ["media", "downloads", "all"]
networks:
t3_proxy:
ipv4_address: $TRANSMISSION_IP
# ports:
# - "$TRANSMISSION_PORT:9091"
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
dns:
- 1.1.1.1
- 1.0.0.1
volumes:
- /etc/localtime:/etc/localtime:ro
- $DOCKERDIR/transmission/data:/data
- $DOCKERDIR/transmission/config:/config
- $DOWNLOAD_DIR:/downloads
environment:
<<: *default-tz-puid-pgid
# OPENVPN_PROVIDER: GIGANEWS
# OPENVPN_USERNAME: $GN_USERNAME
# OPENVPN_PASSWORD: $GN_PASSWORD
# OPENVPN_CONFIG: "USA-Austin-256"
OPENVPN_PROVIDER: PIA
OPENVPN_USERNAME__FILE: /run/secrets/pia_username
OPENVPN_PASSWORD__FILE: /run/secrets/pia_password
OPENVPN_CONFIG: "argentina"
OPENVPN_OPTS: --inactive 3600 --ping 10 --ping-exit 60
LOCAL_NETWORK: $LOCAL_NETWORK
UMASK_SET: 002
TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: "false"
TRANSMISSION_RPC_HOST_WHITELIST: transmission,transmission.$DOMAINNAME
TRANSMISSION_RPC_WHITELIST: $IPWHITELIST
TRANSMISSION_UMASK: 002
TRANSMISSION_RATIO_LIMIT: 0
TRANSMISSION_RATIO_LIMIT_ENABLED: "true"
TRANSMISSION_IDLE_SEEDING_LIMIT: 5
TRANSMISSION_IDLE_SEEDING_LIMIT_ENABLED: "true"
# TRANSMISSION_ALT_SPEED_DOWN: 2000
# TRANSMISSION_ALT_SPEED_ENABLED: "true"
# TRANSMISSION_ALT_SPEED_UP: 15
# TRANSMISSION_SPEED_LIMIT_DOWN: 6000
# TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED: "true"
TRANSMISSION_SPEED_LIMIT_UP: 200
TRANSMISSION_SPEED_LIMIT_UP_ENABLED: "true"
# TRANSMISSION_BLOCKLIST_URL: "http://john.bitsurge.net/public/biglist.p2p.gz"
TRANSMISSION_PEER_LIMIT_GLOBAL: 1000
TRANSMISSION_PEER_LIMIT_PER_TORRENT: 100
TRANSMISSION_DOWNLOAD_QUEUE_SIZE: 10
TRANSMISSION_DOWNLOAD_QUEUE_ENABLED: "true"
TRANSMISSION_QUEUE_STALLED_MINUTES: 30
TRANSMISSION_QUEUE_STALLED_ENABLED: "true"
TRANSMISSION_INCOMPLETE_DIR: "/downloads/incomplete/transmission"
TRANSMISSION_INCOMPLETE_DIR_ENABLED: "true"
TRANSMISSION_WATCH_DIR: "/downloads"
TRANSMISSION_WATCH_DIR_ENABLED: "true"
TRANSMISSION_DOWNLOAD_DIR: "/downloads/completed/transmission"
TRANSMISSION_RPC_USERNAME_FILE: "/run/secrets/transmission_rpc_username"
TRANSMISSION_RPC_PASSWORD_FILE: "/run/secrets/transmission_rpc_password"
secrets:
- pia_username
- pia_password
- transmission_rpc_username
- transmission_rpc_password
labels:
- "traefik.enable=true"
- "traefik.http.routers.transmission-rtr.entrypoints=websecure"
- "traefik.http.routers.transmission-rtr.rule=Host(`transmission.$DOMAINNAME`)"
- "traefik.http.routers.transmission-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.transmission-rtr.service=transmission-svc"
- "traefik.http.services.transmission-svc.loadbalancer.server.port=9091"
# SABnzbd - Binary newsgrabber (NZB downloader)
sabnzbd:
<<: *common-keys-apps
image: linuxserver/sabnzbd
container_name: sabnzbd
profiles: ["media", "downloads", "all"]
# ports:
# - "$SABNZBD_PORT:8080"
volumes:
- $DOCKERDIR/sabnzbd:/config
- $DOWNLOAD_DIR:/downloads
- $DOWNLOAD_DIR/incomplete:/incomplete
- $USERDIR/media/storage:/storage
environment:
<<: *default-tz-puid-pgid
UMASK_SET: 002
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.sabnzbd-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.sabnzbd-rtr-bypass.rule=Host(`sabnzbd.$DOMAINNAME`) && (Header(`X-Api-Key`, `$SABNZBD_API`) || Query(`apikey`, `$SABNZBD_API`))"
- "traefik.http.routers.sabnzbd-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.sabnzbd-rtr.entrypoints=websecure"
- "traefik.http.routers.sabnzbd-rtr.rule=Host(`sabnzbd.$DOMAINNAME`)"
- "traefik.http.routers.sabnzbd-rtr.priority=99"
# Middlewares
- "traefik.http.routers.sabnzbd-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.sabnzbd-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.sabnzbd-rtr.service=sabnzbd-svc"
- "traefik.http.routers.sabnzbd-rtr-bypass.service=sabnzbd-svc"
- "traefik.http.services.sabnzbd-svc.loadbalancer.server.port=8080"
############################# INDEXERS
# PROWLARR - NZB/TOR Proxy Search
prowlarr:
<<: *common-keys-apps
image: linuxserver/prowlarr:develop
container_name: prowlarr
profiles: ["media", "all"]
environment:
<<: *default-tz-puid-pgid
volumes:
- $DOCKERDIR/prowlarr/data:/config
# ports:
# - $PROWLARR_PORT:9696
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.prowlarr-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.prowlarr-rtr-bypass.rule=Host(`prowlarr.$DOMAINNAME`) && (Header(`X-Api-Key`, `$PROWLARR_API`) || Query(`apikey`, `$PROWLARR_API`))"
- "traefik.http.routers.prowlarr-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.prowlarr-rtr.entrypoints=websecure"
- "traefik.http.routers.prowlarr-rtr.rule=Host(`prowlarr.$DOMAINNAME`)"
- "traefik.http.routers.prowlarr-rtr.priority=99"
# Middlewares
- "traefik.http.routers.prowlarr-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.prowlarr-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.prowlarr-rtr.service=prowlarr-svc"
- "traefik.http.routers.prowlarr-rtr-bypass.service=prowlarr-svc"
- "traefik.http.services.prowlarr-svc.loadbalancer.server.port=9696"
flaresolverr:
<<: *common-keys-apps
image: ghcr.io/flaresolverr/flaresolverr:latest
container_name: flaresolverr
profiles: ["media", "all"]
environment:
<<: *default-tz-puid-pgid
#LOG_LEVEL: ${LOG_LEVEL:-info}
#LOG_HTML: ${LOG_HTML:-false}
CAPTCHA_SOLVER: ${CAPTCHA_SOLVER:-none}
# ports:
# - "${PORT:-8191}:8191"
# # NZBHydra2 - NZB meta search
# hydra:
# <<: *common-keys-apps
# image: linuxserver/nzbhydra2
# container_name: hydra
# profiles: ["media", "all"]
# # ports:
# # - "$NZBHYDRA_PORT:5076"
# volumes:
# - $DOCKERDIR/hydra2:/config
# - $DOWNLOAD_DIR:/downloads
# environment:
# <<: *default-tz-puid-pgid
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.hydra-rtr.entrypoints=websecure"
# - "traefik.http.routers.hydra-rtr.rule=Host(`hydra.$DOMAINNAME`)"
# - "traefik.http.routers.hydra-rtr.middlewares=chain-oauth@file"
# - "traefik.http.routers.hydra-rtr.service=hydra-svc"
# - "traefik.http.services.hydra-svc.loadbalancer.server.port=5076"
############################# PVRS
# Lidarr - Music Management
lidarr:
<<: *common-keys-apps
image: linuxserver/lidarr
container_name: lidarr
profiles: ["media", "all"]
# ports:
# - "$LIDARR_PORT:8686"
volumes:
- $DOCKERDIR/lidarr:/config
- $DOWNLOAD_DIR:/downloads
- $USERDIR/media/music:/music
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.lidarr-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.lidarr-rtr-bypass.rule=Host(`lidarr.$DOMAINNAME`) && (Header(`X-Api-Key`, `$LIDARR_API`) || Query(`apikey`, `$LIDARR_API`))"
- "traefik.http.routers.lidarr-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.lidarr-rtr.entrypoints=websecure"
- "traefik.http.routers.lidarr-rtr.rule=Host(`lidarr.$DOMAINNAME`)"
- "traefik.http.routers.lidarr-rtr.priority=99"
# Middlewares
- "traefik.http.routers.lidarr-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.lidarr-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.lidarr-rtr.service=lidarr-svc"
- "traefik.http.routers.lidarr-rtr-bypass.service=lidarr-svc"
- "traefik.http.services.lidarr-svc.loadbalancer.server.port=8686"
# Radarr - Movie management
radarr:
<<: *common-keys-apps
image: linuxserver/radarr:nightly
container_name: radarr
profiles: ["media", "all"]
# ports:
# - "$RADARR_PORT:7878"
volumes:
- $DOCKERDIR/radarr:/config
- $DOWNLOAD_DIR:/downloads
- $USERDIR/media/movies:/movies
- $USERDIR/media/kidsmovies:/kidsmovies
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.radarr-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.radarr-rtr-bypass.rule=Host(`radarr.$DOMAINNAME`) && (Header(`X-Api-Key`, `$RADARR_API`) || Query(`apikey`, `$RADARR_API`))"
- "traefik.http.routers.radarr-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.radarr-rtr.entrypoints=websecure"
- "traefik.http.routers.radarr-rtr.rule=Host(`radarr.$DOMAINNAME`)"
- "traefik.http.routers.radarr-rtr.priority=99"
# Middlewares
- "traefik.http.routers.radarr-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.radarr-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.radarr-rtr.service=radarr-svc"
- "traefik.http.routers.radarr-rtr-bypass.service=radarr-svc"
- "traefik.http.services.radarr-svc.loadbalancer.server.port=7878"
# Sonarr - TV Shows management
sonarr:
<<: *common-keys-apps
image: linuxserver/sonarr:develop
container_name: sonarr
profiles: ["media", "all"]
# ports:
# - "$SONARR_PORT:8989"
volumes:
- $DOCKERDIR/sonarr:/config
- $DOWNLOAD_DIR:/downloads
- $USERDIR/media/tvshows:/tv
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.sonarr-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.sonarr-rtr-bypass.rule=Host(`sonarr.$DOMAINNAME`) && (Header(`X-Api-Key`, `$SONARR_API`) || Query(`apikey`, `$SONARR_API`))"
- "traefik.http.routers.sonarr-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.sonarr-rtr.entrypoints=websecure"
- "traefik.http.routers.sonarr-rtr.rule=Host(`sonarr.$DOMAINNAME`)"
- "traefik.http.routers.sonarr-rtr.priority=99"
# Middlewares
- "traefik.http.routers.sonarr-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.sonarr-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.sonarr-rtr.service=sonarr-svc"
- "traefik.http.routers.sonarr-rtr-bypass.service=sonarr-svc"
- "traefik.http.services.sonarr-svc.loadbalancer.server.port=8989"
# Book Manager and Automation
readarr:
<<: *common-keys-apps
image: linuxserver/readarr:nightly
container_name: readarr
profiles: ["media", "all"]
# ports:
# - "$READARR_PORT:8989"
volumes:
- $DOCKERDIR/readarr/config:/config:Z
- $DOWNLOAD_DIR:/downloads
- $USERDIR/media/books:/books
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.readarr-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.readarr-rtr-bypass.rule=Host(`readarr.$DOMAINNAME`) && (Header(`X-Api-Key`, `$READARR_API`) || Query(`apikey`, `$READARR_API`))"
- "traefik.http.routers.readarr-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.readarr-rtr.entrypoints=websecure"
- "traefik.http.routers.readarr-rtr.rule=Host(`readarr.$DOMAINNAME`)"
- "traefik.http.routers.readarr-rtr.priority=99"
# Middlewares
- "traefik.http.routers.readarr-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.readarr-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.readarr-rtr.service=readarr-svc"
- "traefik.http.routers.readarr-rtr-bypass.service=readarr-svc"
- "traefik.http.services.readarr-svc.loadbalancer.server.port=8787"
# Mylar - Comic Book management
mylar:
<<: *common-keys-apps
image: linuxserver/mylar3
container_name: mylar
profiles: ["media", "all"]
# ports:
# - "$MYLAR_PORT:8090"
volumes:
- $DOCKERDIR/mylar:/config
- $DOWNLOAD_DIR:/downloads
- $USERDIR/media/comics:/comics
environment:
<<: *default-tz-puid-pgid
labels:
- "traefik.enable=true"
# HTTP Routers Auth Bypass
- "traefik.http.routers.mylar-rtr-bypass.entrypoints=websecure"
- "traefik.http.routers.mylar-rtr-bypass.rule=Host(`mylar.$DOMAINNAME`) && (Header(`X-Api-Key`, `$MYLAR_API`) || Query(`apikey`, `$MYLAR_API`))"
- "traefik.http.routers.mylar-rtr-bypass.priority=100"
# HTTP Routers Auth
- "traefik.http.routers.mylar-rtr.entrypoints=websecure"
- "traefik.http.routers.mylar-rtr.rule=Host(`mylar.$DOMAINNAME`)"
- "traefik.http.routers.mylar-rtr.priority=99"
# Middlewares
- "traefik.http.routers.mylar-rtr-bypass.middlewares=chain-no-auth@file"
- "traefik.http.routers.mylar-rtr.middlewares=chain-oauth@file"
# HTTP Services
- "traefik.http.routers.mylar-rtr.service=mylar-svc"
- "traefik.http.routers.mylar-rtr-bypass.service=mylar-svc"
- "traefik.http.services.mylar-svc.loadbalancer.server.port=8090"
# Youtube Downloader
metube:
<<: *common-keys-apps
image: ghcr.io/alexta69/metube
container_name: metube
profiles: ["media", "all"]
# ports:
# - "8081:8081"
volumes:
- $DOWNLOAD_DIR:/downloads
environment:
<<: *default-tz-puid-pgid
DEFAULT_THEME: dark
labels:
- "traefik.enable=true"
- "traefik.http.routers.metube-rtr.entrypoints=websecure"
- "traefik.http.routers.metube-rtr.rule=Host(`metube.$DOMAINNAME`)"
- "traefik.http.routers.metube-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.metube-rtr.service=metube-svc"
- "traefik.http.services.metube-svc.loadbalancer.server.port=8081"
#Notifiarr
notifiarr:
<<: *common-keys-apps
image: golift/notifiarr
container_name: notifiarr
hostname: notifiarr
profiles: ["media", "all"]
# privileged: true
# ports:
# - "5454:5454"
volumes:
- $DOCKERDIR/notifiarr:/config
- /var/run/utmp:/var/run/utmp
- /etc/machine-id:/etc/machine-id
environment:
<<: *default-tz-puid-pgid
## DN_UI_PASSWORD: $HTTP_PASSWORD
DN_API_KEY: $NOTIFIARR_API
DN_LIDARR_0_NAME: Lidarr.$DOMAINNAME
DN_LIDARR_0_URL: http://lidarr:8686/lidarr
DN_LIDARR_0_API_KEY: $LIDARR_API
DN_PROWLARR_0_NAME: Prowlarr.$DOMAINNAME
DN_PROWLARR_0_URL: http://prowlarr:9696
DN_PROWLARR_0_API_KEY: $PROWLARR_API
# DN_PROWLARR_0_USERNAME_FILE: /run/secrets/http_username #$HTTP_USERNAME
# DN_PROWLARR_0_PASSWORD_FILE: /run/secrets/http_password #$HTTP_PASSWORD
DN_RADARR_0_NAME: Radarr.$DOMAINNAME