forked from anandslab/docker-traefik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
498 lines (460 loc) · 15.5 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
version: "3.9"
########################### NETWORKS
# You may customize the network subnet (192.168.89.0/24) below as you please.
# Docker Compose version 3.5 or higher required to define networks this way.
networks:
default:
driver: bridge
npm_proxy:
name: npm_proxy
driver: bridge
ipam:
config:
- subnet: 192.168.89.0/24
# If you decide to use Socket Proxy, you need socket_proxy network as we. See https://www.smarthomebeginner.com/traefik-docker-security-best-practices/#9_Use_a_Docker_Socket_Proxy
########################### EXTENSION FIELDS
# Helps eliminate repetition of sections
# More Info on how to use this: https://github.com/htpcBeginner/docker-traefik/pull/228
# Common environment values
x-environment: &default-tz-puid-pgid
TZ: $TZ
PUID: $PUID
PGID: $PGID
# Keys common to some of the core services that we always to automatically restart on failure
x-common-keys-core: &common-keys-core
networks:
- npm_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:
- npm_proxy
security_opt:
- no-new-privileges:true
restart: unless-stopped
# Keys common to some of the services in media-services.txt
x-common-keys-media: &common-keys-media
networks:
- npm_proxy
security_opt:
- no-new-privileges:true
restart: "no"
########################### SERVICES
services:
############################# FRONTENDS
# Nginx Proxy Manager - Reverse Proxy with LetsEncrypt
npm:
<<: *common-keys-core # See EXTENSION FIELDS at the top
container_name: nginx-proxy-manager
image: 'jc21/nginx-proxy-manager:latest'
# For Static IP
networks:
# For Static IP
npm_proxy:
ipv4_address: 192.168.89.254 # You can specify a static IP
# For Dynamic IP
# networks:
# - npm_proxy
ports:
- '80:80' # Public HTTP Port. Port Forwarding on Router is ON.
- '443:443' # Public HTTPS Port. Port Forwarding on Router is ON.
- '81:81' # Admin Web Port. Port Forwarding on Router is OFF. Internal Home Network Access only - 192.168.89.254:81.
volumes:
- $DOCKERDIR/appdata/npm/config:/config
- $DOCKERDIR/appdata/npm/letsencrypt:/etc/letsencrypt
- $DOCKERDIR/appdata/npm/data:/data
environment:
DB_SQLITE_FILE: "/config/database.sqlite"
DISABLE_IPV6: 'true'
# Portainer - WebUI for Containers
portainer:
<<: *common-keys-core # See EXTENSION FIELDS at the top
container_name: portainer
image: portainer/portainer-ce:latest
command: -H unix:///var/run/docker.sock # Use Docker Socket Proxy and comment this line out, for improved security.
# command: -H tcp://socket-proxy:2375 # Use this instead, if you have Socket Proxy enabled.
networks:
- npm_proxy
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy and comment this line out, for improved security.
- $DOCKERDIR/appdata/portainer/data:/data # Change to local directory if you want to save/transfer config locally.
environment:
- TZ=$TZ
# Heimdall - Application Dashboard
heimdall:
<<: *common-keys-core # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/heimdall
container_name: heimdall
ports:
- "83:80" # 80 to 82 already taken by other services
# - "444:443" # 443 used by Nginx Proxy Manager. Disabled because we will put Heimdall behind proxy.
volumes:
- $DOCKERDIR/appdata/heimdall:/config
environment:
<<: *default-tz-puid-pgid
############################# DOWNLOADERS
# nzbget - Binary newsgrabber (NZB downloader)
nzbget:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/nzbget
container_name: nzbget
networks:
npm_proxy:
ipv4_address: 192.168.89.216
ports:
- "6789:6789"
volumes:
- $DOCKERDIR/appdata/nzbget:/config
- $DATADIR/downloads:/data/downloads
environment:
<<: *default-tz-puid-pgid
# TransmissionBT - Torrent Downloader
# For Proxmox LXC Containers - https://pve.proxmox.com/wiki/OpenVPN_in_LXC
transmission-vpn:
image: haugene/transmission-openvpn:latest
container_name: transmission-vpn
restart: unless-stopped
networks:
npm_proxy:
ipv4_address: 192.168.89.169
ports:
- "9091:9091"
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
volumes:
- /etc/localtime:/etc/localtime:ro
- $DOCKERDIR/appdata/transmission-vpn/data:/data
- $DOCKERDIR/appdata/transmission-vpn/config:/config
- $DATADIR/downloads:/data/downloads
environment:
<<: *default-tz-puid-pgid
OPENVPN_PROVIDER: FASTESTVPN
OPENVPN_USERNAME: $FASTEST_USERNAME
OPENVPN_PASSWORD: $FASTEST_PASSWORD
LOCAL_NETWORK: "$LOCAL_NETWORK"
UMASK_SET: 2
TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: "true"
TRANSMISSION_RPC_HOST_WHITELIST: "127.0.0.1,$SERVER_IP"
TRANSMISSION_RPC_PASSWORD: $TRANSMISSION_RPC_PASSWORD
TRANSMISSION_RPC_USERNAME: $TRANSMISSION_RPC_USERNAME
TRANSMISSION_UMASK: 002
TRANSMISSION_RATIO_LIMIT: 1.00
TRANSMISSION_RATIO_LIMIT_ENABLED: "true"
TRANSMISSION_ALT_SPEED_DOWN: 40000
TRANSMISSION_ALT_SPEED_ENABLED: "false"
TRANSMISSION_ALT_SPEED_UP: 250
TRANSMISSION_SPEED_LIMIT_DOWN: 80000
TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED: "true"
TRANSMISSION_SPEED_LIMIT_UP: 500
TRANSMISSION_SPEED_LIMIT_UP_ENABLED: "true"
TRANSMISSION_INCOMPLETE_DIR: /data/downloads/torrents/incomplete
TRANSMISSION_INCOMPLETE_DIR_ENABLED: "true"
TRANSMISSION_WATCH_DIR: /data/downloads/torrents
TRANSMISSION_WATCH_DIR_ENABLED: "true"
TRANSMISSION_DOWNLOAD_DIR: /data/downloads/torrents
LOG_TO_STDOUT: "true"
# qBittorrent - Torrent downloader without VPN
qbittorrent:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
#network_mode: container:transmission-vpn # Passing network through Transmission Container if VPN is needed.
ports:
- "8080:8080"
volumes:
- $DOCKERDIR/appdata/qbittorrent:/config
- $DATADIR/downloads:/data/downloads # Ensure that downloads folder is set to /data/downloads in qBittorrent
environment:
<<: *default-tz-puid-pgid
UMASK_SET: 002
############################# PVRS
# Prowlarr - Indexer Proxy
prowlarr:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: ghcr.io/linuxserver/prowlarr:develop
container_name: prowlarr
networks:
npm_proxy:
ipv4_address: 192.168.89.162
ports:
- "9696:9696"
volumes:
- $DOCKERDIR/appdata/prowlarr:/config
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
# Lidarr - Music Management
lidarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/lidarr:latest
container_name: lidarr
networks:
npm_proxy:
ipv4_address: 192.168.89.163
ports:
- "8686:8686"
volumes:
- $DOCKERDIR/appdata/lidarr:/config
- $DATADIR/downloads:/data/downloads
- $DATADIR/local/music:/data/media/music
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
# Radarr - Movie management
radarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/radarr:nightly # latest was causing "Error parsing column 45"
container_name: radarr
networks:
npm_proxy:
ipv4_address: 192.168.89.164
ports:
- "7878:7878"
volumes:
- $DOCKERDIR/appdata/radarr:/config
- $DATADIR:/data
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
# Sonarr - TV Shows management
sonarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/sonarr
container_name: sonarr
networks:
npm_proxy:
ipv4_address: 192.168.89.167
ports:
- "8989:8989"
volumes:
- $DOCKERDIR/appdata/sonarr:/config
- $DATADIR:/data
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
# Readarr - Books management
readarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: hotio/readarr:nightly
container_name: readarr
ports:
- "8987:8987"
volumes:
- $DOCKERDIR/appdata/readarr:/config
- $DATADIR:/data
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
UMASK: 002
#ARGS: ""
############################# MEDIA
# Airsonic Advanced - Music Server
airsonic:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/airsonic-advanced
container_name: airsonic-advanced
ports:
- "4040:4040"
- "4041:4041" #UPnp
volumes:
- $DOCKERDIR/appdata/airsonic/podcasts:/data/podcasts
- $DOCKERDIR/appdata/airsonic/playlists:/data/playlists
- $DOCKERDIR/appdata/airsonic/config:/config
- $DATADIR/local/music:/data/music
environment:
<<: *default-tz-puid-pgid
JAVA_OPTS: '-Dserver.forward-headers-strategy=native' # Optional - if you use a reverse-proxy
# Jellyfin - Media Server
jellyfin:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: jellyfin/jellyfin:latest
container_name: jellyfin
#devices:
# - /dev/dri:/dev/dri # for harware transcoding
ports:
- "8096:8096"
- "8920:8920" # Emby also uses same port if running both
environment:
<<: *default-tz-puid-pgid
UMASK_SET: 022
volumes:
- $DOCKERDIR/appdata/jellyfin:/config
- $DATADIR/downloads:/data/downloads
- $DATADIR/media:/data/media
- /dev/shm:/data/transcode # Offload transcoding to RAM if you have enough RAM
# Plex - Media Server
plexms:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: plexinc/pms-docker:public
container_name: plexms
ports:
- "32400:32400/tcp"
- "3005:3005/tcp"
- "8324:8324/tcp"
- "32469:32469/tcp"
# - "1900:1900/udp" # Conflicts with xTeVe and Synology default ports
- "32410:32410/udp"
- "32412:32412/udp"
- "32413:32413/udp"
- "32414:32414/udp"
# - "33400:33400" # If you use Plex Web Tools
#devices:
# - /dev/dri:/dev/dri # for harware transcoding
volumes:
- $DOCKERDIR/appdata/plexms:/config
- $DATADIR/media:/media
- /dev/shm:/transcode
environment:
TZ: $TZ
HOSTNAME: "dockerPlex"
PLEX_CLAIM_FILE: $PLEX_CLAIM
PLEX_UID: $PUID
PLEX_GID: $PGID
ADVERTISE_IP: http://$SERVER_IP:32400/
# Tautulli - Plex Stats and Monitoring
tautulli:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: linuxserver/tautulli:latest
container_name: tautulli
ports:
- "8181:8181"
volumes:
- $DOCKERDIR/appdata/tautulli/config:/config
- $DOCKERDIR/appdata/plexms/Library/Application Support/Plex Media Server/Logs:/logs:ro # For tautulli Plex log viewer
environment:
<<: *default-tz-puid-pgid
# Ombi - Media Requests
ombi:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: linuxserver/ombi:latest
container_name: ombi
ports:
- "3579:3579"
volumes:
- $DOCKERDIR/appdata/ombi:/config
environment:
<<: *default-tz-puid-pgid
############################# MEDIA FILE MANAGEMENT
# Bazarr - Subtitle Management
bazarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/bazarr
container_name: bazarr
ports:
- "6767:6767"
volumes:
- $DOCKERDIR/appdata/bazarr:/config
- $DATADIR/media:/data/media
environment:
<<: *default-tz-puid-pgid
# Picard - Music Library Tagging and Management
picard:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: mikenye/picard:latest
container_name: picard
ports:
- "5800:5800"
volumes:
- $DATADIR:/data:rw
- $DOCKERDIR/appdata/picard:/config:rw
- /dev/shm:/dev/shm
environment:
USER_ID: $PUID
GROUP_ID: $PGID
TZ: $TZ
UMASK: 002
DISPLAY_WIDTH: 1600
DISPLAY_HEIGHT: 960
# Handbrake - Video Conversion (Transcoding and compression)
handbrake:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: jlesage/handbrake:latest
container_name: handbrake
ports:
- "5801:5800"
volumes:
- $DATADIR/downloads:/data/downloads
- $DOCKERDIR/appdata/handbrake/config:/config
- $DOCKERDIR/appdata/handbrake/watch:/watch
environment:
USER_ID: $PUID
GROUP_ID: $PGID
UMASK: 002
TZ: $TZ
KEEP_APP_RUNNING: 1
CLEAN_TMP_DIR: 1
DISPLAY_WIDTH: 1600
DISPLAY_HEIGHT: 960
AUTOMATED_CONVERSION_KEEP_SOURCE: 1
VNC_PASSWORD: $HANDBRAKE_VNC_PASSWD
############################# UTILITIES
# Dozzle - Real-time Docker Log Viewer
dozzle:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: amir20/dozzle:latest
container_name: dozzle
networks:
- npm_proxy
ports:
- "8081:8080" # qBittorrent is using port 8080
environment:
DOZZLE_LEVEL: info
DOZZLE_TAILSIZE: 300
DOZZLE_FILTER: "status=running"
# DOZZLE_FILTER: "label=log_me" # limits logs displayed to containers with this label.
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this instead if you have Socket Proxy enabled.
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Use Docker Socket Proxy and comment this line for improved security.
# File Browser - Explorer
filebrowser:
<<: *common-keys-core # See EXTENSION FIELDS at the top
image: filebrowser/filebrowser:s6
container_name: filebrowser
ports:
- "82:80" # 80 and 81 are used by Nginx Proxy Manager
volumes:
- $DOCKERDIR/appdata/filebrowser:/config
- $USERDIR:/srv
environment:
<<: *default-tz-puid-pgid
############################# MAINTENANCE
# Docker-GC - Automatic Docker Garbage Collection
# Create docker-gc-exclude file
dockergc:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: clockworksoul/docker-gc-cron:latest
container_name: docker-gc
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Use Docker Socket Proxy and comment this line for improved security.
- $DOCKERDIR/appdata/docker-gc/docker-gc-exclude:/etc/docker-gc-exclude # Create empty file
environment:
CRON: 0 0 0 * * ? # Everyday at midnight. Previously 0 0 * * *
FORCE_IMAGE_REMOVAL: 1
FORCE_CONTAINER_REMOVAL: 0
GRACE_PERIOD_SECONDS: 604800
DRY_RUN: 0
CLEAN_UP_VOLUMES: 1
TZ: $TZ
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this if you have Socket Proxy enabled.
# WatchTower - Automatic Docker Container Updates
watchtower:
<<: *common-keys-core # See EXTENSION FIELDS at the top
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
TZ: $TZ
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_REMOVE_VOLUMES: "true"
WATCHTOWER_INCLUDE_STOPPED: "true"
WATCHTOWER_NO_STARTUP_MESSAGE: "false"
WATCHTOWER_SCHEDULE: "0 30 12 * * *" # Everyday at 12:30
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this if you have Socket Proxy enabled.
DOCKER_API_VERSION: "1.40"