-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
1116 lines (1055 loc) · 40.9 KB
/
docker-compose.yaml
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
#Reference: https://www.smarthomebeginner.com/docker-home-media-server-2018-basic
# https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker/
# https://www.smarthomebeginner.com/google-oauth-with-traefik-docker/
# https://github.com/htpcBeginner/docker-traefik_v1
version: "3.7"
########################### ENV VARIABLES
x-common-variables: &common-variables
OUTDOOR_LEFT_CAM_IMAGE_URL: http://10.10.10.101/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=wuuPhkmUCeI9WG7C&user=${OUTDOOR_LEFT_CAM_USER}&password=${OUTDOOR_LEFT_CAM_PASSWORD}
OUTDOOR_LEFT_CAM_STREAM_URL: rtsp://${OUTDOOR_LEFT_CAM_USER}:${OUTDOOR_LEFT_CAM_PASSWORD}@10.10.10.101:554/h264Preview_01_main
OFFICE_CAM_STREAM_URL: rtsp://${OFFICE_CAM_USER}:${OFFICE_CAM_PASSWORD}@10.10.10.51/live
OFFICE_CAM_COMMAND: -rtsp_transport udp -i rtsp://${OFFICE_CAM_USER}:${OFFICE_CAM_PASSWORD}@10.10.10.51/live
LIVING_ROOM_RELAX_AREA_CAM_STREAM_URL: rtsp://${LIVING_ROOM_RELAX_AREA_CAM_USER}:${LIVING_ROOM_RELAX_AREA_CAM_PASSWORD}@10.10.10.49/live
LIVING_ROOM_RELAX_AREA_CAM_COMMAND: -rtsp_transport udp -i rtsp://${LIVING_ROOM_RELAX_AREA_CAM_USER}:${LIVING_ROOM_RELAX_AREA_CAM_PASSWORD}@10.10.10.49/live
MARIA_DB_URL: mysql://${USER}:${MYSQL_ROOT_PASSWORD}@localhost:${DB_PORT}/home_assistant?charset=utf8
PLEX_CLAIM: ${PLEX_CLAIM}
PLEX_PORT: ${PLEX_PORT}
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
########################### NETWORKS
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge
########################### SERVICES
services:
############################# HOSTED WEBSITES
# Blog TROKA Software about software, smart home, etc
blog-troka-software:
image: 'bitnami/nginx:1.16'
volumes:
- ${HOMESERVERDIR}/blog.troka.software:/app
- ${HOMESERVERDIR}/shared:/shared
ports:
- '${BLOG_TROKA_SOFTWARE_PORT}:8080'
networks:
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.backend=blog-troka-software"
- "traefik.frontend.rule=Host:${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /portainer"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# FRONTENDS
# Traefik - Reverse Proxy
# Create traefik.toml and rules dir and acme dir before running container.
traefik:
image: traefik:v1.7.24
container_name: traefik
hostname: traefik
restart: unless-stopped
domainname: ${DOMAINNAME}
networks:
- default
- traefik_proxy
ports:
- "80:80"
- "443:443"
- "${TRAEFIK_PORT}:8080"
dns:
- ${SERVER_IP}
- ${ROUTER_IP}
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${HOMESERVERDIR}/traefik/traefik.toml:/etc/traefik/traefik.toml
- ${HOMESERVERDIR}/traefik/rules.toml:/etc/traefik/rules.toml
- ${HOMESERVERDIR}/traefik/acme/acme.json:/etc/traefik/acme/acme.json
- ${HOMESERVERDIR}/shared:/shared
environment:
- CF_API_EMAIL=${CLOUDFLARE_EMAIL}
- CF_API_KEY=${CLOUDFLARE_API_KEY}
- DUCKDNS_TOKEN=${DUCKDNS_TOKEN}
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /traefik"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=traefik.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
- "traefik.frontend.auth.basic.users=${HTTP_USERNAME}:${HTTP_PASSWORD}"
# Portainer - Container Management
# Needs trailing / in the URL if using PathPrefixStrip
portainer:
image: portainer/portainer
container_name: portainer
hostname: portainer
restart: unless-stopped
command: -H unix:///var/run/docker.sock
networks:
- traefik_proxy
ports:
- "${PORTAINER_PORT}:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOMESERVERDIR}/portainer/data:/data
- ${HOMESERVERDIR}/shared:/shared
environment:
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=portainer"
- "traefik.frontend.rule=Host:portainer.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /portainer"
- "traefik.port=9000"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=portainer.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Organizer - Unified HTPC/Home Server Web Interface
organizr:
image: lsiocommunity/organizr
container_name: organizr
hostname: organizr
restart: always
networks:
- traefik_proxy
volumes:
- ${HOMESERVERDIR}/organizr:/config
- ${HOMESERVERDIR}/shared:/shared
ports:
- "${ORGANIZER_PORT}:80"
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=organizr"
- "traefik.frontend.rule=Host:organizr.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /organizr"
- "traefik.port=80"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=organizr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# GAMING
minecraft:
image: itzg/minecraft-bedrock-server
container_name: minecraft
hostname: minecraft
restart: always
networks:
- traefik_proxy
ports:
- 19132:19132/udp
volumes:
- ${HOMESERVERDIR}/minecraft:/data
environment:
- LEVEL_NAME=CosmicFriendsV3
- SERVER_NAME=TROKA.Software.Minecraft
- SERVER_PORT=19132
- EULA=TRUE
- GAMEMODE=survival
- DIFFICULTY=easy
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=minecraft"
- "traefik.frontend.rule=Host:minecraft.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /minecraft"
- "traefik.port=19132"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=minecraft.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# SMART HOME
# Home Assistant - Smart Home Hub
homeassistant:
image: homeassistant/home-assistant:2022.3
container_name: homeassistant
hostname: hass
restart: always
network_mode: host
devices:
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- ${HOMESERVERDIR}/homeassistant:/config
# - ${HOMESERVERDIR}/hassio-addons-duckdns/ssl/:/ssl/
- ${SURVEILLANCEDIR}:/downloads/surveillance
- /etc/localtime:/etc/localtime:ro
- ${HOMESERVERDIR}/shared:/shared
- ${HOMESERVERDIR}/mariadb/mysqld:/run/mysqld # unix socket volume share for blazing fast MySQL communication on local network (https://stackoverflow.com/questions/58029324/2002-cant-connect-to-local-mysql-server-through-socket-run-mysqld-mysqld-so)
#ports:
# - "${HOME_ASSISTANT_PORT}:8123"
privileged: true
environment:
<<: *common-variables
#networks:
# - host
# - traefik_proxy
# - default
#labels:
# - "traefik.enable=true"
# - "traefik.backend=homeassistant"
# - "traefik.frontend.rule=Host:smarthome.${DOMAINNAME}"
# - "traefik.port=8123"
# - "traefik.docker.network=traefik_proxy"
# - "traefik.frontend.headers.SSLRedirect=true"
# - "traefik.frontend.headers.STSSeconds=315360000"
# - "traefik.frontend.headers.browserXSSFilter=true"
# - "traefik.frontend.headers.contentTypeNosniff=true"
# - "traefik.frontend.headers.forceSTSHeader=true"
# - "traefik.frontend.headers.SSLHost=smarthome.${DOMAINNAME}"
# - "traefik.frontend.headers.STSIncludeSubdomains=true"
# - "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny=true"
shinobi:
image: shinobisystems/shinobi:latest
ports:
- "8899:8080"
networks:
- traefik_proxy
volumes:
- /dev/shm/shinobiStreams:/dev/shm/streams
- $HOMESERVERDIR/shinobi/Config:/config
- $HOMESERVERDIR/shinobi/CustomAutoLoad:/customAutoLoad
- $HOMESERVERDIR/shinobi/Database:/var/lib/mysql
#- $HOMESERVERDIR/shinobi/super.json:/opt/shinobi/super.json # better use /config/super.json
- ${SURVEILLANCEDIR}/shinobi-videos:/home/Shinobi/videos
environment:
- APP_BRANCH=dev
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=nvr"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /nvr"
- "traefik.frontend.rule=Host:nvr.${DOMAINNAME}"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=nvr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# DATABASE
# phpMyAdmin - Database management
# Create a new user with admin privileges. Cannot login as root.
phpmyadmin:
hostname: phpmyadmin
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin
restart: always
links:
- mariadb:db
ports:
- ${PHPMYADMIN_PORT}:80
environment:
- PMA_HOST=${DB_HOST}
- PMA_PORT=${DB_PORT}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
# MariaDB – Database Server for your Apps
mariadb:
image: "linuxserver/mariadb"
container_name: "mariadb"
hostname: ${DB_HOST}
volumes:
- ${HOMESERVERDIR}/mariadb:/config
- ${HOMESERVERDIR}/mariadb/mysqld:/var/run/mysqld # unix socket volume share for blazing fast MySQL communication on local network
ports:
- target: ${DB_PORT}
published: ${DB_PORT}
protocol: tcp
mode: host
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
############################# STORAGE
# NextCloud – Your Own Cloud Storage
nextcloud:
container_name: nextcloud
hostname: nextcloud
restart: unless-stopped
image: ghcr.io/linuxserver/nextcloud #nextcloud:latest
volumes:
- ${STORAGEDIR}/shared_data:/data #/var/www/html/data
- ${HOMESERVERDIR}/nextcloud/config:/config #/var/www/html/config
#- ${HOMESERVERDIR}/nextcloud/custom_apps:/var/www/html/custom_apps
#- ${HOMESERVERDIR}/nextcloud/themes:/var/www/html/themes
#- ${HOMESERVERDIR}/nextcloud/html:/var/www/html
- ${HOMESERVERDIR}/shared:/shared
#- ${HOMESERVERDIR}/nextcloud/custom-init.sh:/usr/local/bin/apache2-custom.sh
#networks:
#- traefik_proxy
#- default
#command:
#- apache2-custom.sh
ports:
- "${NEXTCLOUD_PORT}:443"
environment:
- NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_USER}
- NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_PASSWORD}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=${USER}
- MYSQL_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_HOST=${DB_HOST}
- MYSQL_PORT=${DB_PORT}
- REDIS_HOST_PORT=${REDIS_PORT}
- REDIS_HOST_PASSWORD=${REDIS_PASSWORD}
- PUID=${PUID}
- PGID=${PGID}
labels:
- "traefik.enable=true"
- "traefik.backend=nextcloud"
- "traefik.frontend.rule=Host:cloud.${DOMAINNAME}"
- "traefik.port=443"
- "traefik.protocol=https"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=cloud.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Redis - fast semi-persistant, in-memory DB
redis:
image: redis:latest
container_name: redis
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- "${REDIS_PORT}:6379"
volumes:
- "${HOMESERVERDIR}/redis:/data"
############################# DOWNLOADING
# TransmissionBT - Torrent Downloader
# ONLY ACCESSIBLE THROUGH https://domain.com/transmission/web/ if using PathPrefix
transmission-vpn:
image: haugene/transmission-openvpn
container_name: transmission-vpn
hostname: transmission
restart: unless-stopped
networks:
- traefik_proxy
ports:
- "${TRANSMISSION_PORT}:9091"
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
restart: always
dns:
- 1.1.1.1
- 1.0.0.1
volumes:
- /etc/localtime:/etc/localtime:ro
- ${CACHEDIR}/transmission-vpn:/data
- ${HOMESERVERDIR}/shared:/shared
- ${CACHEDIR}/Downloads:/data/watch
- ${STORAGEDIR}/Downloads/completed:/downloads/completed
- ${CACHEDIR}/Downloads/incomplete:/downloads/incomplete
environment:
- OPENVPN_PROVIDER=NORDVPN
- OPENVPN_USERNAME=${NORDVPN_USERNAME}
- OPENVPN_PASSWORD=${NORDVPN_PASSWORD}
- OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60
#- NORDVPN_PROTOCOL=tcp
#- NORDVPN_CATEGORY=P2P
#- ENABLE_UFW=false
- LOCAL_NETWORK=192.168.1.0/24,10.10.10.0/24
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
- TRANSMISSION_RPC_HOST_WHITELIST="127.0.0.1,192.168.*.*,10.10.10.*"
- TRANSMISSION_RPC_PASSWORD=${TRANSMISSION_RPC_PASSWORD}
- TRANSMISSION_RPC_USERNAME=${TRANSMISSION_RPC_USERNAME}
- TRANSMISSION_CACHE_SIZE_MB=64
#- TRANSMISSION_UMASK="002"
- TRANSMISSION_RATIO_LIMIT=0.01
- TRANSMISSION_RATIO_LIMIT_ENABLED=true
- TRANSMISSION_ALT_SPEED_DOWN=2000
- TRANSMISSION_ALT_SPEED_ENABLED=false
- TRANSMISSION_ALT_SPEED_UP=15
- TRANSMISSION_SPEED_LIMIT_DOWN=6000
- TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED=false
- TRANSMISSION_SPEED_LIMIT_UP=30
- TRANSMISSION_SPEED_LIMIT_UP_ENABLED=false
- TRANSMISSION_DOWNLOAD_QUEUE_SIZE=5000
- TRANSMISSION_DOWNLOAD_QUEUE_ENABLED=false
- TRANSMISSION_INCOMPLETE_DIR=/downloads/incomplete
- TRANSMISSION_INCOMPLETE_DIR_ENABLED=true
- TRANSMISSION_WATCH_DIR=/downloads
- TRANSMISSION_WATCH_DIR_ENABLED=true
- TRANSMISSION_DOWNLOAD_DIR=/downloads/completed
- TRANSMISSION_MAX_PEERS_GLOBAL=65000
- TRANSMISSION_PEER_LIMIT_GLOBAL=65000
- TRANSMISSION_PEER_LIMIT_PER_TORRENT=65000
- TRANSMISSION_ENCRYPTION=2
- TRANSMISSION_DHT_ENABLED=true
- TRANSMISSION_LPD_ENABLED=false
- TRANSMISSION_PEX_ENABLED=true
- TRANSMISSION_UTP_ENABLED=false
labels:
- "traefik.enable=true"
- "traefik.backend=transmission-vpn"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /transmission"
- "traefik.frontend.rule=Host:downloader.${DOMAINNAME}"
- "traefik.port=9091"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=downloader.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Jackett – Torrent Proxy
jackett:
image: "linuxserver/jackett"
hostname: jackett
container_name: "jackett"
volumes:
- ${HOMESERVERDIR}/jackett:/config
- ${CACHEDIR}/Downloads/completed:/downloads
- "/etc/localtime:/etc/localtime:ro"
- ${HOMESERVERDIR}/shared:/shared
ports:
- "${JACKETT_PORT}:9117"
restart: always
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
############################# PVRS
# Lidarr - Music Management
# Set url_base in lidarr settings if using PathPrefix
lidarr:
image: "linuxserver/lidarr"
container_name: "lidarr"
hostname: lidarr
restart: unless-stopped
networks:
- traefik_proxy
ports:
- "${LIDARR_PORT}:8686"
volumes:
- ${HOMESERVERDIR}/lidarr:/config
- ${STORAGEDIR}/Downloads/completed:/downloads
- ${STORAGEDIR}/music:/music
- "/etc/localtime:/etc/localtime:ro"
- ${HOMESERVERDIR}/shared:/shared
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=lidarr"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /radarr"
- "traefik.frontend.rule=Host:lidarr.${DOMAINNAME}"
- "traefik.port=8686"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=lidarr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Radarr - Movie management
# Set url_base in radarr settings if using PathPrefix
radarr:
image: "linuxserver/radarr:latest"
container_name: "radarr"
hostname: radarr
restart: unless-stopped
ports:
- "${RADARR_PORT}:7878"
volumes:
- ${HOMESERVERDIR}/radarr:/config
- ${STORAGEDIR}/Downloads/completed:/downloads
- ${STORAGEDIR}/movies:/movies
- "/etc/localtime:/etc/localtime:ro"
- ${HOMESERVERDIR}/shared:/shared
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=radarr"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /radarr"
- "traefik.frontend.rule=Host:radarr.${DOMAINNAME}"
- "traefik.port=7878"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=radarr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Sonarr - TV Shows management
# Set url_base in sonarr settings if using PathPrefix
sonarr:
image: "linuxserver/sonarr:latest"
container_name: "sonarr"
hostname: sonarr
restart: unless-stopped
networks:
- traefik_proxy
ports:
- "${SONARR_PORT}:8989"
volumes:
- ${HOMESERVERDIR}/sonarr:/config
- ${STORAGEDIR}/Downloads/completed:/downloads
- ${STORAGEDIR}/tvshows:/tv
- "/etc/localtime:/etc/localtime:ro"
- ${HOMESERVERDIR}/shared:/shared
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
labels:
- "traefik.enable=true"
- "traefik.backend=sonarr"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /sonarr"
- "traefik.frontend.rule=Host:sonarr.${DOMAINNAME}"
- "traefik.port=8989"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=sonarr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# MEDIA
# PhotoPrism - Photos Server
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism
restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- 2342:2342 # [local port]:[container port]
environment:
PHOTOPRISM_ADMIN_PASSWORD: "U3AG3DhfqnVwsQKuci7BEb3AqknCPsyoc8YrXt7SdY8ffWhMjjsQL778xZ8HSrNJYCagT6qdj3obTVDjeVVstASaa9SwyTagoEJKEstDYe2EaXvHpa2LASXTZQa4biQt"
PHOTOPRISM_ORIGINALS_LIMIT: 10000 # File size limit for originals in MB (increase for high-res video)
PHOTOPRISM_HTTP_COMPRESSION: "gzip" # Improves transfer speed and bandwidth utilization (none or gzip)
PHOTOPRISM_DEBUG: "false" # Run in debug mode (shows additional log messages)
PHOTOPRISM_PUBLIC: "false" # No authentication required (disables password protection)
PHOTOPRISM_READONLY: "false" # Don't modify originals directory (reduced functionality)
PHOTOPRISM_EXPERIMENTAL: "false" # Enables experimental features
PHOTOPRISM_DISABLE_WEBDAV: "false" # Disables built-in WebDAV server
PHOTOPRISM_DISABLE_SETTINGS: "false" # Disables Settings in Web UI
PHOTOPRISM_DISABLE_TENSORFLOW: "false" # Disables using TensorFlow for image classification
PHOTOPRISM_DARKTABLE_PRESETS: "false" # Enables Darktable presets and disables concurrent RAW conversion
PHOTOPRISM_DETECT_NSFW: "false" # Flag photos as private that MAY be offensive (requires TensorFlow)
PHOTOPRISM_UPLOAD_NSFW: "true" # Allow uploads that MAY be offensive
# PHOTOPRISM_DATABASE_DRIVER: "sqlite" # SQLite is an embedded database that doesn't require a server
PHOTOPRISM_DATABASE_DRIVER: "mysql" # Use MariaDB (or MySQL) instead of SQLite for improved performance
PHOTOPRISM_DATABASE_SERVER: "${DB_HOST}:${DB_PORT}" # MariaDB database server (hostname:port)
PHOTOPRISM_DATABASE_NAME: "photoprism" # MariaDB database schema name
PHOTOPRISM_DATABASE_USER: ${USER} # MariaDB database user name
PHOTOPRISM_DATABASE_PASSWORD: ${MYSQL_ROOT_PASSWORD} # MariaDB database user password
PHOTOPRISM_SITE_URL: "https://photos.${DOMAINNAME}" # Public PhotoPrism URL
PHOTOPRISM_SITE_TITLE: "TROKA.Software.SmartHome.Photos"
PHOTOPRISM_SITE_CAPTION: "Thorough Research On Key Aspects"
PHOTOPRISM_SITE_DESCRIPTION: ""
PHOTOPRISM_SITE_AUTHOR: "TROKA Software"
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
volumes:
- "${STORAGEDIR}/private/photos:/photoprism/originals"
- "${STORAGEDIR}/private/photos/.import:/photoprism/import"
- "${HOMESERVERDIR}/photoprism:/photoprism/storage/config"
- "${CACHEDIR}/photoprism/sidecar:/photoprism/storage/sidecar"
- "${CACHEDIR}/photoprism/cache:/photoprism/storage/cache"
labels:
- "traefik.enable=true"
- "traefik.backend=photos"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefix: /radarr"
- "traefik.frontend.rule=Host:photos.${DOMAINNAME}"
- "traefik.port=2342"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=photos.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Plex - Media Server
plexms:
image: plexinc/pms-docker:public
container_name: plexms
hostname: plexms
restart: unless-stopped
networks:
- traefik_proxy
ports:
- "${PLEX_PORT}:32400/tcp"
- "3005:3005/tcp"
- "8324:8324/tcp"
- "32469:32469/tcp"
#- "1900:1900/udp"
- "32410:32410/udp"
- "32412:32412/udp"
- "32413:32413/udp"
- "${PLEX_WEB_TOOLS_PORT}:32414/udp"
volumes:
- ${HOMESERVERDIR}/plexms:/config
- ${CACHEDIR}/Downloads/plex_tmp/_plex_disable_transcode_dir_:/transcode
- ${STORAGEDIR}/movies:/media/movies
- ${STORAGEDIR}/tvshows:/media/tvshows
- ${STORAGEDIR}/music:/media/music
- ${STORAGEDIR}/XXX:/media/XXX
- ${STORAGEDIR}/private:/media/private
- ${HOMESERVERDIR}/shared:/shared
environment:
- TZ=${TZ}
- HOSTNAME="Docker Plex"
- PLEX_CLAIM=${PLEX_CLAIM}
- PLEX_UID=${PUID}
- PLEX_GID=${PGID}
- ADVERTISE_IP="https://${SERVER_IP}:${PLEX_PORT}/"
labels:
- "traefik.enable=true"
- "traefik.backend=plexms"
- "traefik.frontend.rule=Host:plex.${DOMAINNAME}"
- "traefik.port=32400"
- "traefik.protocol=https"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=plex.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# Jellyfin - Media Server
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
hostname: jellyfin
restart: unless-stopped
networks:
- traefik_proxy
ports:
- "8096:8096"
- "8920:8920"
environment:
PUID: ${PUID}
PGID: ${PGID}
TZ: ${TZ}
UMASK_SET: 022
volumes:
- ${HOMESERVERDIR}/jellyfin:/config
- /dev/shm:/ram_transcode
- ${STORAGEDIR}/movies:/media/movies
- ${STORAGEDIR}/tvshows:/media/tvshows
- ${STORAGEDIR}/music:/media/music
- ${STORAGEDIR}/XXX:/media/XXX
- ${STORAGEDIR}/private:/media/private
- ${HOMESERVERDIR}/shared:/shared
# - /media:/nas:ro # Run in ro mode while upgrading JF
labels:
- "traefik.enable=true"
- "traefik.backend=jellyfin"
- "traefik.frontend.rule=Host:jellyfin.${DOMAINNAME}"
- "traefik.port=8096"
- "traefik.protocol=https"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=jellyfin.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# AirSonic - Music Server
airsonic:
image: ghcr.io/linuxserver/airsonic
container_name: airsonic
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
#- CONTEXT_PATH=<URL_BASE> #optional
#- JAVA_OPTS=<options> #optional
volumes:
- ${HOMESERVERDIR}/airsonic:/config
- ${STORAGEDIR}/music:/music
#- </path/to/playlists>:/playlists
#- </path/to/podcasts>:/podcasts
#- </path/to/other media>:/media #optional
ports:
- 4040:4040
#devices:
# - /dev/snd:/dev/snd #optional
restart: unless-stopped
# Roon - Audiophile Commercial Music Server
roon:
image: steefdebruijn/docker-roonserver
container_name: roon
expose:
- "9003/udp"
- "9100-9200/tcp"
- "1900/udp"
ports:
- "9003:9003/udp"
- "9100-9200:9100-9200/udp"
- "1900:1900/udp"
pid: host
privileged: true
network_mode: host
restart: unless-stopped
init: true
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${HOMESERVERDIR}/roon-app:/app
- ${HOMESERVERDIR}/roon-data:/data
- ${HOMESERVERDIR}/backups/roon:/backup
- ${HOMESERVERDIR}/roon-storage:/storage
- ${STORAGEDIR}/music:/music
#ports:
# - 9100:9100
#devices:
# - /dev/snd:/dev/snd #optional
# Volumio - Audiophile Music Server
volumio:
image: jbonjean/volumio
container_name: volumio
environment:
- HOST=192.168.1.50:3000
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
#- CONTEXT_PATH=<URL_BASE> #optional
#- JAVA_OPTS=<options> #optional
volumes:
- ${HOMESERVERDIR}/volumio:/data
- ${STORAGEDIR}/music:/ro
#- </path/to/playlists>:/playlists
#- </path/to/podcasts>:/podcasts
#- </path/to/other media>:/media #optional
ports:
- 3000:3000
#devices:
# - /dev/snd:/dev/snd #optional
restart: unless-stopped
# Tautulli - Previously PlexPy. Plex statistics and monitoring
# Set HTTP Root in Tautulli settings if using PathPrefix
tautulli:
image: linuxserver/tautulli
container_name: tautulli
hostname: tautulli
restart: unless-stopped
ports:
- "${TAUTULLI_PORT}:8181"
volumes:
- ${HOMESERVERDIR}/tautulli/config:/config
- ${HOMESERVERDIR}/tautulli/logs:/logs:ro
- ${HOMESERVERDIR}/shared:/shared
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
# Ombi – Accept Requests for your Media Server
ombi:
container_name: ombi
hostname: ombi
restart: always
image: linuxserver/ombi
volumes:
- ${HOMESERVERDIR}/ombi:/config
- ${HOMESERVERDIR}/shared:/shared
ports:
- "${OMBI_PORT}:3579"
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
############################# MEDIA FILE MANAGEMENT
# Bazarr - Subtitle Management
bazarr:
image: linuxserver/bazarr
container_name: bazarr
hostname: bazarr
restart: unless-stopped
#networks:
#- traefik_proxy
ports:
- "6767:6767"
volumes:
- ${HOMESERVERDIR}/bazarr:/config
- ${STORAGEDIR}/movies:/media/movies
- ${STORAGEDIR}/tvshows:/media/tvshows
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
labels:
- "traefik.enable=true"
- "traefik.backend=bazarr"
- "traefik.frontend.rule=Host:bazarr.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /bazarr"
- "traefik.port=6767"
- "traefik.docker.network=traefik_proxy"
- "traefik.protocol=https"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=bazarr.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
############################# UTILITIES
# UniFi Controller - managing your UniFi network
unifi-controller:
container_name: unifi-controller
image: jacobalberty/unifi
restart: always
volumes:
- '${HOMESERVERDIR}/unifi:/unifi'
ports:
- "3478:3478/udp" # STUN
- "6789:6789/tcp" # Speed test
- "8080:8080/tcp" # Device/ controller communication
- "8443:8443/tcp" # Controller GUI/API as seen in a web browser
- "8880:8880/tcp" # HTTP portal redirection
- "8843:8843/tcp" # HTTPS portal redirection
- "10001:10001/udp" # AP discovery
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
networks:
- traefik_proxy
labels:
- "traefik.enable=true"
- "traefik.backend=unifi-controller"
- "traefik.frontend.rule=Host:unifi.${DOMAINNAME}"
# - "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /unifi"
- "traefik.port=8443"
- "traefik.docker.network=traefik_proxy"
- "traefik.protocol=https"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=unifi.${DOMAINNAME}"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
# - "traefik.frontend.headers.frameDeny: true" #customFrameOptionsValue overrides this
- "traefik.frontend.headers.customFrameOptionsValue: allow-from https:${DOMAINNAME}"
# PiHole - network wide DNS-level ads blocking
pihole:
container_name: pihole
domainname: ${DOMAINNAME}
image: pihole/pihole:latest