-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
856 lines (801 loc) · 21.8 KB
/
docker-compose.yaml
File metadata and controls
856 lines (801 loc) · 21.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
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
# x-logging entry for "default-logging" - Restricts log files from growing too large
# The best solution in case someone forgets to turn off debug logging for a service
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
services:
# Internet Connectivity
traefik:
image: traefik:latest
container_name: traefik
logging: *default-logging
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
ports:
- "192.168.1.3:80:80"
- "192.168.1.3:443:443"
environment:
- TZ=${TZ}
- CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
- TRAEFIK_AUTH=${TRAEFIK_AUTH}
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${APPDATA}/traefik/traefik.yml:/traefik.yml:ro
- ${APPDATA}/traefik/dynamic:/dynamic:ro
- ${APPDATA}/traefik/acme.json:/acme.json
command:
- "--configFile=/traefik.yml"
tunnel:
image: cloudflare/cloudflared:latest
container_name: cloudflared-tunnel
logging: *default-logging
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
networks:
- proxy
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
logging: *default-logging
hostname: 819-ubuntu-docker
networks:
macvlan:
ipv4_address: 192.168.1.8
cap_add:
- NET_ADMIN
- SYS_MODULE
volumes:
- ${APPDATA}/tailscale:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
environment:
- TS_AUTHKEY=${TS_AUTHKEY}
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
- TS_EXTRA_ARGS=--advertise-routes=192.168.1.5/32 --accept-routes
restart: unless-stopped
authentik-redis:
image: docker.io/library/redis
container_name: authentik-redis
logging: *default-logging
command: --save 60 1 --loglevel warning
restart: unless-stopped
networks:
- internal
volumes:
- ${APPDATA}/authentik/redis:/data
authentik-server:
image: ghcr.io/goauthentik/server:${AUTHENTIK_TAG}
container_name: authentik-server
logging: *default-logging
restart: unless-stopped
command: server
networks:
- proxy
- internal
environment:
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: postgres
AUTHENTIK_POSTGRESQL__NAME: ${AUTHENTIK_PG_DB}
AUTHENTIK_POSTGRESQL__USER: ${AUTHENTIK_PG_USER}
AUTHENTIK_POSTGRESQL__PASSWORD: ${AUTHENTIK_PG_PASS}
AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}
# NOTE: Do not define TZ (timezone)
volumes:
- ${APPDATA}/authentik/media:/media
- ${APPDATA}/authentik/custom-templates:/templates
# NOTE: Do NOT mount /etc/localtime or /etc/timezone here. Authentik needs UTC.
depends_on:
postgres:
condition: service_healthy
authentik-redis:
condition: service_started
authentik-worker:
image: ghcr.io/goauthentik/server:${AUTHENTIK_TAG}
container_name: authentik-worker
logging: *default-logging
restart: unless-stopped
command: worker
networks:
- internal
environment:
AUTHENTIK_REDIS__HOST: authentik-redis
AUTHENTIK_POSTGRESQL__HOST: postgres
AUTHENTIK_POSTGRESQL__NAME: ${AUTHENTIK_PG_DB}
AUTHENTIK_POSTGRESQL__USER: ${AUTHENTIK_PG_USER}
AUTHENTIK_POSTGRESQL__PASSWORD: ${AUTHENTIK_PG_PASS}
AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY}
user: root
volumes:
- ${APPDATA}/authentik/media:/media
- ${APPDATA}/authentik/certs:/certs
- ${APPDATA}/authentik/custom-templates:/templates
depends_on:
postgres:
condition: service_healthy
authentik-redis:
condition: service_started
pihole:
image: pihole/pihole:latest
container_name: pihole
logging: *default-logging
hostname: pihole
restart: unless-stopped
dns: # For container startup only
- 1.1.1.1
- 8.8.8.8
cap_add:
- NET_ADMIN
- SYS_TIME
- SYS_NICE
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- FTLCONF_dns_listeningMode=ALL
- FTLCONF_webserver_api_password=${PIHOLE_PASSWORD}
- FTLCONF_dns_reply_host_force4=true
- FTLCONF_dns_reply_host_IPv4=192.168.1.4
- "FTLCONF_misc_dnsmasq_lines=address=/${FQDN}/192.168.1.3;server=/${FQDN}/"
- WEBTHEME=default-dark
- IPv6=false
ports:
- "192.168.1.4:53:53/tcp"
- "192.168.1.4:53:53/udp"
- "192.168.1.4:80:80/tcp"
volumes:
- '${APPDATA}/pihole/etc-pihole/:/etc/pihole/'
- '${APPDATA}/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
networks:
- proxy
postgres:
image: docker.io/library/postgres:16
container_name: postgres
logging: *default-logging
restart: unless-stopped
networks:
- internal
environment:
# Main Credentials
POSTGRES_USER: ${POSTGRES_SUPER_USER}
POSTGRES_PASSWORD: ${POSTGRES_SUPER_PASS}
# Add any app passwords below so the init script can use them
AUTHENTIK_PG_PASS: ${AUTHENTIK_PG_PASS}
volumes:
- ${APPDATA}/postgres/data:/var/lib/postgresql/data
- ${APPDATA}/postgres/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
# arr suite
bazarr:
image: lscr.io/linuxserver/bazarr:latest
container_name: bazarr
logging: *default-logging
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/bazarr:/config'
- '${MEDIA}/plex/movies:/movies'
- '${MEDIA}/plex/tv:/tv'
restart: unless-stopped
networks:
- proxy
- internal
lidarr:
image: lscr.io/linuxserver/lidarr:latest
container_name: lidarr
logging: *default-logging
hostname: lidarr
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/lidarr:/config'
- '${MEDIA}/plex/music:/music'
- '${MEDIA}/downloads:/downloads'
restart: unless-stopped
networks:
- proxy
- internal
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
logging: *default-logging
hostname: prowlarr
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/prowlarr:/config'
restart: unless-stopped
networks:
- proxy
- internal
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
logging: *default-logging
hostname: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/radarr:/config'
- '${MEDIA}/plex/movies:/movies'
- '${MEDIA}/downloads:/downloads'
restart: unless-stopped
networks:
- proxy
- internal
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
logging: *default-logging
hostname: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/sonarr:/config'
- '${MEDIA}/plex/tv:/tv'
- '${MEDIA}/downloads:/downloads'
restart: unless-stopped
networks:
- proxy
- internal
# calibre-web:
# image: lscr.io/linuxserver/calibre-web:latest
# container_name: calibre-web
# environment:
# - PUID=1000
# - PGID=1000
# - TZ=${TZ}
# - DOCKER_MODS=linuxserver/calibre-web:calibre
# - OAUTHLIB_RELAX_TOKEN_SCOPE=1
# volumes:
# - ${APPDATA}/calibre:/config
# - ${MEDIA}/books:/books
# restart: unless-stopped
# networks:
# - proxy
# - internal
# User Landing Pages
glance:
image: glanceapp/glance
container_name: glance
logging: *default-logging
hostname: glance
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/glance:/app/config'
restart: unless-stopped
networks:
- proxy
homepage:
image: ghcr.io/gethomepage/homepage:latest
container_name: homepage
logging: *default-logging
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- HOMEPAGE_ALLOWED_HOSTS=homepage.${FQDN}
volumes:
- '${APPDATA}/homepage/config:/app/config'
- '${APPDATA}/homepage/images:/app/public/images'
- '${APPDATA}/homepage/icons:/app/public/icons'
- '${MEDIA}:/storage:ro'
restart: unless-stopped
networks:
- proxy
# Media Server
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
logging: *default-logging
hostname: 819-plex
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- VERSION=public
volumes:
- '${APPDATA}/plex:/config'
- '${MEDIA}/plex/tv:/tv'
- '${MEDIA}/plex/movies:/movies'
- '${MEDIA}/plex/music:/music'
restart: unless-stopped
networks:
macvlan:
ipv4_address: 192.168.1.5
proxy:
plextraktsync-watch:
image: ghcr.io/taxel/plextraktsync:latest
container_name: plextraktsync-watch
logging: *default-logging
command: watch
volumes:
- '${APPDATA}/plextraktsync/config:/app/config'
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
restart: unless-stopped
networks:
- proxy
plextraktsync-sync:
image: ghcr.io/taxel/plextraktsync:latest
container_name: plextraktsync-sync
logging: *default-logging
command: sync
volumes:
- '${APPDATA}/plextraktsync/config:/app/config'
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
restart: on-failure:2
networks:
- proxy
ofelia-scheduler:
image: mcuadros/ofelia:latest
container_name: ofelia-scheduler
logging: *default-logging
depends_on:
- plextraktsync-sync
command: daemon --docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
labels:
ofelia.job-run.plextraktsync-daily.schedule: "0 0 3 * * *" # Daily at 3 AM
ofelia.job-run.plextraktsync-daily.container: "plextraktsync-sync"
seerr:
image: ghcr.io/fallenbagel/jellyseerr:latest
container_name: seerr
logging: *default-logging
hostname: seerr
init: true
volumes:
- '${APPDATA}/seerr/config:/app/config'
environment:
- PUID=1000
- PGID=1000
- LOG_LEVEL=debug
- TZ=${TZ}
- PORT=5055
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:5055/api/v1/status || exit 1
start_period: 20s
timeout: 3s
interval: 15s
retries: 3
restart: unless-stopped
networks:
- proxy
tautulli:
image: lscr.io/linuxserver/tautulli:latest
container_name: tautulli
logging: *default-logging
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/tautulli:/config'
restart: unless-stopped
networks:
- proxy
# File Sharing
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
logging: *default-logging
hostname: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- WEBUI_PORT=8090
volumes:
- '${APPDATA}/qbittorrent:/config'
- '${MEDIA}/downloads:/downloads'
restart: unless-stopped
networks:
- proxy
- internal
sabnzbd:
image: lscr.io/linuxserver/sabnzbd:latest
container_name: sabnzbd
logging: *default-logging
hostname: sabnzbd
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
volumes:
- '${APPDATA}/sabnzbd:/config'
- '${MEDIA}/downloads:/downloads'
restart: unless-stopped
networks:
- proxy
- internal
unpackerr:
image: golift/unpackerr:latest
container_name: "unpackerr"
logging: *default-logging
volumes:
- '${APPDATA}/unpackerr:/data/logs'
- '${MEDIA}/downloads:/data/downloads'
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
- UN_DEBUG=false
- UN_LOG_FILE=/data/logs/log
- UN_LOG_FILES=10
- UN_LOG_FILE_MB=10
- UN_INTERVAL=2m
- UN_START_DELAY=1m
- UN_RETRY_DELAY=5m
- UN_MAX_RETRIES=3
- UN_PARALLEL=1
- UN_FILE_MODE=0644
- UN_DIR_MODE=0755
- UN_SONARR_0_URL=http://sonarr:8989
- UN_SONARR_0_API_KEY=2c2bfe4d0458445387acf019c4af9347
- UN_SONARR_0_PATHS_0=/data/downloads/qbittorrent/sonarr
- UN_SONARR_0_PROTOCOLS=torrent
- UN_SONARR_0_TIMEOUT=10s
- UN_SONARR_0_DELETE_ORIG=false
- UN_SONARR_0_DELETE_DELAY=5m
- UN_RADARR_0_URL=http://radarr:7878
- UN_RADARR_0_API_KEY=4cd71a712a694e2f956aa2ba385c2a8c
- UN_RADARR_0_PATHS_0=/data/downloads/qbittorrent/radarr
- UN_RADARR_0_PROTOCOLS=torrent
- UN_RADARR_0_TIMEOUT=10s
- UN_RADARR_0_DELETE_ORIG=false
- UN_RADARR_0_DELETE_DELAY=5m
- UN_LIDARR_0_URL=http://lidarr:8686
- UN_LIDARR_0_API_KEY=eae6cc411d3f477f9482ddacd787b17e
- UN_LIDARR_0_PATHS_0=/data/downloads/qbittorrent/lidarr
- UN_LIDARR_0_PROTOCOLS=torrent
- UN_LIDARR_0_TIMEOUT=10s
- UN_LIDARR_0_DELETE_ORIG=false
- UN_LIDARR_0_DELETE_DELAY=5m
networks:
- internal
# Chat/IRC Services
# quassel-core:
# image: lscr.io/linuxserver/quassel-core:latest
# container_name: quassel-core
# logging: *default-logging
# environment:
# - PUID=1000
# - PGID=1000
# - TZ=${TZ}
# - RUN_OPTS=""
# - DB_BACKEND=SQLite
# - AUTH_AUTHENTICATOR=Database
# volumes:
# - '${APPDATA}/quassel-core:/config'
# restart: unless-stopped
# networks:
# - internal
# ports:
# - "4242:4242"
#
# quassel-web:
# image: lscr.io/linuxserver/quassel-web:latest
# container_name: quassel-web
# logging: *default-logging
# environment:
# - PUID=1000
# - PGID=1000
# - TZ=${TZ}
# - QUASSEL_CORE=quassel-core
# - QUASSEL_PORT=4242
# - URL_BASE=/quassel
# volumes:
# - '${APPDATA}/quassel-web:/config'
# restart: unless-stopped
# networks:
# - proxy
# - internal
conduit:
image: matrixconduit/matrix-conduit:latest
container_name: conduit
logging: *default-logging
environment:
CONDUIT_CONFIG: "/etc/conduit.toml"
RUST_BACKTRACE: 1
volumes:
- ${APPDATA}/conduit/data:/var/lib/matrix-conduit
- ${APPDATA}/conduit/conduit.toml:/etc/conduit.toml:ro
restart: unless-stopped
networks:
- proxy
element-web:
image: vectorim/element-web:latest
container_name: element-web
logging: *default-logging
restart: unless-stopped
volumes:
- ${APPDATA}/element-web/element-config.json:/app/config.json
networks:
- proxy
# Network Services
unifi-db:
image: docker.io/mongo:7.0
container_name: unifi-db
logging: *default-logging
restart: unless-stopped
networks:
- internal
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
- MONGO_USER=${MONGO_USER}
- MONGO_PASS=${MONGO_PASS}
- MONGO_DBNAME=${MONGO_DBNAME}
- MONGO_AUTHSOURCE=${MONGO_AUTHSOURCE}
volumes:
- ${APPDATA}/unifi/db/data:/data/db
- ${APPDATA}/unifi/db/init/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
unifi-network-application:
image: lscr.io/linuxserver/unifi-network-application:latest
container_name: unifi-network-application
logging: *default-logging
restart: unless-stopped
depends_on:
- unifi-db
networks:
macvlan:
ipv4_address: 192.168.1.6
internal:
proxy:
environment:
- PUID=1000
- PGID=1000
- TZ=${TZ}
# Database Connection
- MONGO_USER=${MONGO_USER}
- MONGO_PASS=${MONGO_PASS}
- MONGO_HOST=unifi-db
- MONGO_PORT=27017
- MONGO_DBNAME=${MONGO_DBNAME}
- MONGO_AUTHSOURCE=${MONGO_AUTHSOURCE}
# Performance
- MEM_LIMIT=1024
- MEM_STARTUP=1024
- MOUNT_POINTS=/config
volumes:
- '${APPDATA}/unifi/app:/config'
samba:
image: ghcr.io/servercontainers/samba:latest
container_name: samba
logging: *default-logging
hostname: storage
restart: unless-stopped
cap_add:
- CAP_NET_ADMIN
environment:
- SAMBA_CONF_LOG_LEVEL=1
- AVAHI_NAME=storage
- SAMBA_CONF_WORKGROUP=WORKGROUP
- SAMBA_CONF_SERVER_STRING=storage
- MODEL=TimeCapsule
- ACCOUNT_${SAMBA_USER1}=${SAMBA_PASS1}
- UID_${SAMBA_USER1}=1000
- SAMBA_GLOBAL_CONFIG_fruit:aapl=yes
- SAMBA_GLOBAL_CONFIG_fruit:nfs_aces=no
- |-
SAMBA_VOLUME_CONFIG_storage=[Storage]
path=/shares/storage
valid users = ${SAMBA_USER1}
guest ok = no
read only = no
browseable = yes
create mask = 0664
directory mask = 0775
vfs objects = catia fruit streams_xattr
fruit:resource = file
fruit:metadata = stream
fruit:encoding = native
- |-
SAMBA_VOLUME_CONFIG_cache=[Cache]
path=/shares/cache
valid users = ${SAMBA_USER1}
guest ok = no
read only = no
browseable = yes
create mask = 0664
directory mask = 0775
vfs objects = catia fruit streams_xattr
fruit:resource = file
fruit:metadata = stream
fruit:encoding = native
volumes:
- ${MEDIA}:/shares/storage
- /mnt/nvme:/shares/cache
networks:
macvlan:
ipv4_address: 192.168.1.7
# --- OBSERVABILITY CORE ---
# VictoriaMetrics: Metrics Database
victoriametrics:
image: victoriametrics/victoria-metrics:latest
container_name: victoriametrics
logging: *default-logging
user: "1000:1000"
volumes:
- ${APPDATA}/victoriametrics:/storage
- ${APPDATA}/victoriametrics/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '-storageDataPath=/storage'
- '-retentionPeriod=2y'
- '-promscrape.config=/etc/prometheus/prometheus.yml'
- '-httpListenAddr=:8428'
restart: always
networks:
- internal
- proxy
# Loki: Log Database
loki:
image: grafana/loki:latest
container_name: loki
logging: *default-logging
user: "1000:1000"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ${APPDATA}/loki/data:/loki
- ${APPDATA}/loki/tmp:/tmp/loki
- ${APPDATA}/loki/loki-config.yaml:/etc/loki/local-config.yaml
restart: always
networks:
- internal
# Grafana: The Dashboard
grafana:
image: grafana/grafana:latest
container_name: grafana
logging: *default-logging
user: "1000:1000"
volumes:
- ${APPDATA}/grafana:/var/lib/grafana
restart: always
networks:
- internal
- proxy
# --- OBSERVABILITY COLLECTORS ---
# Unpoller: Unifi Stats
unpoller:
image: ghcr.io/unpoller/unpoller:latest
container_name: unpoller
logging: *default-logging
user: "1000:1000"
environment:
- UP_UNIFI_DEFAULT_URL=https://unifi-network-application:8443
- UP_UNIFI_DEFAULT_USER=${UNIFI_RO_USER}
- UP_UNIFI_DEFAULT_PASS=${UNIFI_RO_PASS}
- UP_UNIFI_DEFAULT_SAVE_SITES=true
- UP_INFLUXDB_DISABLE=true
- UP_PROMETHEUS_HTTP_LISTEN=:9130
- UP_UNIFI_DEFAULT_SSL_VERIFY=false
restart: always
networks:
- internal
# Node Exporter (VM): Monitors USB HDD & VM Resources
node-exporter-vm:
image: quay.io/prometheus/node-exporter:latest
container_name: node-exporter-vm
logging: *default-logging
command:
- '--path.rootfs=/host'
pid: host
restart: always
volumes:
- '/:/host:ro,rslave'
networks:
- internal
# cAdvisor: Container Stats
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
logging: *default-logging
privileged: true
devices:
- /dev/kmsg
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
restart: always
networks:
- internal
# Promtail: Log Shipper
promtail:
image: grafana/promtail:latest
container_name: promtail
logging: *default-logging
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- ${APPDATA}/promtail/config.yml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
restart: always
networks:
- internal
# Proxmox Exporter
pve-exporter:
image: prompve/prometheus-pve-exporter:latest
container_name: pve-exporter
logging: *default-logging
volumes:
- ${APPDATA}/pve-exporter/pve.yml:/etc/prometheus/pve.yml
restart: always
networks:
- proxy
# Docker Socket Proxy
dockerproxy:
image: ghcr.io/tecnativa/docker-socket-proxy:latest
container_name: dockerproxy
logging: *default-logging
environment:
- CONTAINERS=1 # Allow access to viewing containers
- SERVICES=1 # Allow access to viewing services
- TASKS=1 # Allow access to viewing tasks
- POST=0 # Disallow any POST operations
ports:
- 127.0.0.1:2375:2375
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
networks:
- proxy
networks:
macvlan:
driver: macvlan
driver_opts:
parent: eth0
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.1
proxy:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-proxy
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1
internal:
driver: bridge
internal: true
driver_opts:
com.docker.network.bridge.name: br-internal
ipam:
config:
- subnet: 172.21.0.0/16
gateway: 172.21.0.1