forked from DonMcD/ultimate-plex-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
290 lines (270 loc) · 8.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
290 lines (270 loc) · 8.03 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
---
networks:
proxy:
name: proxy
external: true
services:
# ================================================================================
# VPN GATEWAY - Gluetun
# ================================================================================
# This container provides a secure VPN gateway for download clients.
# All download traffic is routed through NordVPN with WireGuard protocol.
# Built-in kill switch ensures no traffic leaks if VPN disconnects.
vpn:
image: qmcgaw/gluetun:latest
container_name: vpn
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
ports:
# qBittorrent WebUI
- "8080:8080"
# qBittorrent connection port
- "8694:8694"
- "8694:8694/udp"
# NZBGet WebUI (if needed later)
- "6789:6789"
# Non-secret config comes from .env.config (via --env-file)
# Secrets (VPN credentials) come from .env.secrets as container env vars.
env_file:
- .env.secrets
environment:
- VPN_SERVICE_PROVIDER=${VPN_PROVIDER}
- VPN_TYPE=${VPN_PROTOCOL}
# Server countries: Panama (primary), Switzerland (fallback)
- SERVER_COUNTRIES=Panama,Switzerland
# Use TCP (more reliable for NordVPN with these credentials)
- OPENVPN_PROTOCOL=tcp
# Kill switch is enabled by default in Gluetun
- FIREWALL_OUTBOUND_SUBNETS=172.16.0.0/12,192.168.0.0/16
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
# Log level for troubleshooting
- LOG_LEVEL=info
# Extra OpenVPN CLI flags (ex: add ping-restart to auto-recover link)
- OPENVPN_FLAGS=${OPENVPN_FLAGS}
volumes:
- ${CONFIG_ROOT}/vpn:/gluetun
networks:
- proxy
restart: unless-stopped
healthcheck:
test: ["CMD", "/gluetun-entrypoint", "healthcheck"]
interval: 60s
timeout: 10s
retries: 3
start_period: 60s
# ================================================================================
# DOWNLOAD CLIENTS - Routed through VPN
# ================================================================================
# These services use network_mode: "service:vpn" to route ALL traffic through VPN
# They share the VPN container's network stack and have no direct internet access
# qBittorrent - Torrent client
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
# CRITICAL: This routes ALL qBittorrent traffic through the VPN container
network_mode: "service:vpn"
depends_on:
vpn:
condition: service_healthy
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- WEBUI_PORT=8080
- TORRENTING_PORT=8694
volumes:
- ${CONFIG_ROOT}/qbittorrent:/config
- ${DOWNLOAD_ROOT}:/downloads
- ${MEDIA_ROOT}:/media
restart: unless-stopped
# ================================================================================
# MEDIA SERVER - Direct connection (NO VPN)
# ================================================================================
# Plex Media Server
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
ports:
- "32400:32400"
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- VERSION=docker
- PLEX_CLAIM=${PLEX_CLAIM}
volumes:
- ${CONFIG_ROOT}/plex:/config
- ${MEDIA_ROOT}/tv:/tv
- ${MEDIA_ROOT}/movies:/movies
- transcode:/transcode
restart: unless-stopped
# ================================================================================
# MEDIA MANAGEMENT - Direct connection (NO VPN)
# ================================================================================
# Radarr - Movie management
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/radarr:/config
- ${DOWNLOAD_ROOT}:/downloads
- ${MEDIA_ROOT}/movies:/movies
networks:
- proxy
ports:
- "7878:7878"
restart: unless-stopped
# Sonarr - TV show management
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/sonarr:/config
- ${DOWNLOAD_ROOT}:/downloads
- ${MEDIA_ROOT}/tv:/tv
networks:
- proxy
ports:
- "8989:8989"
restart: unless-stopped
# Prowlarr - Indexer management
prowlarr:
image: lscr.io/linuxserver/prowlarr:latest
container_name: prowlarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/prowlarr:/config
networks:
- proxy
ports:
- "9696:9696"
restart: unless-stopped
# Bazarr - Subtitle management
bazarr:
image: lscr.io/linuxserver/bazarr:latest
container_name: bazarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/bazarr:/config
- ${MEDIA_ROOT}/movies:/movies
- ${MEDIA_ROOT}/tv:/tv
networks:
- proxy
ports:
- "6767:6767"
restart: unless-stopped
# Overseerr - Request management
overseerr:
image: lscr.io/linuxserver/overseerr:latest
container_name: overseerr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/overseerr:/config
networks:
- proxy
ports:
- "5055:5055"
restart: unless-stopped
# ================================================================================
# REVERSE PROXY - Direct connection (NO VPN)
# ================================================================================
# Nginx Proxy Manager
npm:
image: jc21/nginx-proxy-manager:latest
container_name: npm
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
volumes:
- ${CONFIG_ROOT}/npm/data:/data
- ${CONFIG_ROOT}/npm/letsencrypt:/etc/letsencrypt
networks:
- proxy
ports:
- "80:80"
- "443:443"
- "81:81"
restart: unless-stopped
# ================================================================================
# MEDIA PROCESSING - Direct connection (NO VPN)
# ================================================================================
# Tdarr - Media transcoding
tdarr:
image: ghcr.io/haveagitgat/tdarr:latest
container_name: tdarr
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- UMASK_SET=002
- nodeName=MainNode
- serverIP=0.0.0.0
- serverPort=8266
- webUIPort=8265
- internalNode=true
- inContainer=true
- ffmpegVersion=6
volumes:
- ${CONFIG_ROOT}/tdarr/server:/app/server
- ${CONFIG_ROOT}/tdarr/configs:/app/configs
- ${CONFIG_ROOT}/tdarr/logs:/app/logs
- ${MEDIA_ROOT}:/media
- transcode:/temp
networks:
- proxy
ports:
- "8265:8265"
- "8266:8266"
restart: unless-stopped
# ================================================================================
# CONFIGURATION AUTOMATION - Buildarr (one-shot)
# ================================================================================
# Buildarr - Configuration-as-code for Arr services
buildarr:
image: python:3.11-slim
container_name: buildarr
profiles:
- advanced # run only when explicitly requested
# Secrets for Buildarr (e.g., API keys, qBittorrent credentials)
# are loaded from .env.secrets inside the container.
env_file:
- .env.secrets
environment:
- TZ=${TZ}
volumes:
- ./buildarr.yml:/config/buildarr.yml.tpl:ro
- ./buildarr-entrypoint.sh:/config/buildarr-entrypoint.sh:ro
entrypoint: /bin/sh
command: /config/buildarr-entrypoint.sh
networks:
- proxy # must be able to reach prowlarr/radarr/sonarr
restart: "no"
volumes:
transcode:
driver: local
driver_opts:
type: none
o: bind
device: ${CONFIG_ROOT}/../transcode