/
/
/
Ansible role that provisions my storage server.
1# Arr Stack with Gluetun VPN Docker Compose Configuration
2# Generated by Ansible - DO NOT EDIT MANUALLY
3
4
5services:
6 gluetun:
7 image: {{ gluetun_image }}:{{ gluetun_version }}
8 container_name: gluetun
9 restart: unless-stopped
10
11 # VPN Configuration
12 env_file:
13 - .env
14
15 # Capabilities for VPN
16 cap_add:
17 - NET_ADMIN
18
19 # Port Mapping for all Arr services
20 ports:
21 - "{{ sonarr_host_port }}:{{ sonarr_port }}"
22 - "{{ radarr_host_port }}:{{ radarr_port }}"
23 - "{{ prowlarr_host_port }}:{{ prowlarr_port }}"
24 - "{{ lazylibrarian_host_port }}:{{ lazylibrarian_port }}"
25 - "{{ jellyseer_host_port }}:{{ jellyseer_port }}"
26 - "{{ flaresolverr_host_port }}:{{ flaresolverr_port }}"
27 - "{{ qbittorrent_host_port }}:{{ qbittorrent_port }}"
28{% if bazarr_enabled %}
29 - "{{ bazarr_host_port }}:{{ bazarr_port }}"
30{% endif %}
31{% if lidarr_enabled %}
32 - "{{ lidarr_host_port }}:{{ lidarr_port }}"
33{% endif %}
34{% if cleanuparr_enabled %}
35 - "{{ cleanuparr_host_port }}:{{ cleanuparr_port }}"
36{% endif %}
37
38 # Volume Mounts
39 volumes:
40 - {{ gluetun_config_dir }}:/gluetun
41
42 # Network (isolated arr network)
43 networks:
44 - {{ arr_docker_network }}
45
46 # Health Check
47 healthcheck:
48 test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://www.google.com"]
49 interval: 30s
50 timeout: 10s
51 retries: 3
52 start_period: 60s
53
54{% if sonarr_enabled %}
55 sonarr:
56 image: {{ sonarr_image }}:{{ sonarr_version }}
57 container_name: sonarr
58 restart: unless-stopped
59 depends_on:
60 gluetun:
61 condition: service_healthy
62
63 # Environment Configuration
64 env_file:
65 - .env
66
67 # Use Gluetun network stack
68 network_mode: "service:gluetun"
69
70 # Volume Mounts
71 volumes:
72 - {{ sonarr_config_dir }}:/config
73 - {{ sonarr_tv_dir }}:/shows
74 - {{ arr_downloads_dir }}:/downloads
75
76{% endif %}
77
78{% if bazarr_enabled %}
79 bazarr:
80 image: {{ bazarr_image }}:{{ bazarr_version }}
81 container_name: bazarr
82 restart: unless-stopped
83 depends_on:
84 gluetun:
85 condition: service_healthy
86
87 # Use Gluetun network stack
88 network_mode: "service:gluetun"
89
90 # Environment Configuration
91 env_file:
92 - .env
93
94 volumes:
95 - {{ bazarr_config_dir }}:/config
96 - {{ bazarr_shows_dir }}:/shows
97 - {{ bazarr_movies_dir }}:/movies
98
99{% endif %}
100
101{% if radarr_enabled %}
102 radarr:
103 image: {{ radarr_image }}:{{ radarr_version }}
104 container_name: radarr
105 restart: unless-stopped
106 depends_on:
107 gluetun:
108 condition: service_healthy
109
110 # Environment Configuration
111 env_file:
112 - .env
113
114 # Use Gluetun network stack
115 network_mode: "service:gluetun"
116
117 # Volume Mounts
118 volumes:
119 - {{ radarr_config_dir }}:/config
120 - {{ radarr_movies_dir }}:/movies
121 - {{ arr_downloads_dir }}:/downloads
122
123{% endif %}
124
125{% if prowlarr_enabled %}
126 prowlarr:
127 image: {{ prowlarr_image }}:{{ prowlarr_version }}
128 container_name: prowlarr
129 restart: unless-stopped
130 depends_on:
131 gluetun:
132 condition: service_healthy
133
134 # Environment Configuration
135 env_file:
136 - .env
137
138 # Use Gluetun network stack
139 network_mode: "service:gluetun"
140
141 # Volume Mounts
142 volumes:
143 - {{ prowlarr_config_dir }}:/config
144
145{% endif %}
146
147{% if lazylibrarian_enabled %}
148 lazylibrarian:
149{% if lazylibrarian_custom_build | default(false) %}
150 build: .
151 image: {{ lazylibrarian_custom_image }}
152{% else %}
153 image: {{ lazylibrarian_image }}:{{ lazylibrarian_version }}
154{% endif %}
155 container_name: lazylibrarian
156 restart: unless-stopped
157 depends_on:
158 gluetun:
159 condition: service_healthy
160
161 # Environment Configuration
162 env_file:
163 - .env
164
165 environment:
166 - DOCKER_MODS=linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg
167 - PUID={{ storage_uid }}
168 - PGID={{ storage_gid }}
169
170 # Use Gluetun network stack
171 network_mode: "service:gluetun"
172
173 # Volume Mounts
174 volumes:
175 - {{ lazylibrarian_config_dir }}:/config
176 - {{ lazylibrarian_books_dir }}:/books
177 - {{ arr_downloads_dir }}:/downloads
178
179{% endif %}
180
181{% if jellyseer_enabled %}
182 jellyseer:
183 image: {{ jellyseer_image }}:{{ jellyseer_version }}
184 container_name: jellyseer
185 restart: unless-stopped
186
187 # Dependencies
188 depends_on:
189 gluetun:
190 condition: service_healthy
191
192 # Environment Configuration
193 env_file:
194 - .env
195
196 # Use Gluetun network stack
197 network_mode: "service:gluetun"
198
199 # Volume Mounts
200 volumes:
201 - {{ jellyseer_config_dir }}:/app/config
202
203{% endif %}
204
205{% if flaresolverr_enabled %}
206 flaresolverr:
207 image: {{ flaresolverr_image }}:{{ flaresolverr_version }}
208 container_name: flaresolverr
209 restart: unless-stopped
210 depends_on:
211 gluetun:
212 condition: service_healthy
213
214 # Environment Configuration
215 env_file:
216 - .env
217
218 # Use Gluetun network stack
219 network_mode: "service:gluetun"
220
221 # Volume Mounts
222 volumes:
223 - {{ flaresolverr_config_dir }}:/app/config
224
225{% endif %}
226
227{% if qbittorrent_enabled %}
228 qbittorrent:
229 image: {{ qbittorrent_image }}:{{ qbittorrent_version }}
230 container_name: qbittorrent
231 restart: unless-stopped
232 depends_on:
233 gluetun:
234 condition: service_healthy
235
236 # Environment Configuration
237 env_file:
238 - .env
239
240 # Use Gluetun network stack
241 network_mode: "service:gluetun"
242
243 # Volume Mounts
244 volumes:
245 - {{ qbittorrent_config_dir }}:/config
246 - {{ qbittorrent_downloads_dir }}:/downloads
247
248{% endif %}
249
250{% if lidarr_enabled %}
251 lidarr:
252 image: {{ lidarr_image }}:{{ lidarr_version }}
253 container_name: lidarr
254 restart: unless-stopped
255 depends_on:
256 gluetun:
257 condition: service_healthy
258
259 # Environment Configuration
260 env_file:
261 - .env
262
263 # Use Gluetun network stack
264 network_mode: "service:gluetun"
265
266 # Volume Mounts
267 volumes:
268 - {{ lidarr_config_dir }}:/config
269 - {{ lidarr_music_dir }}:/music
270 - {{ arr_downloads_dir }}:/downloads
271
272{% endif %}
273
274{% if cleanuparr_enabled %}
275 cleanuparr:
276 image: {{ cleanuparr_image }}:{{ cleanuparr_version }}
277 container_name: cleanuparr
278 restart: unless-stopped
279 depends_on:
280 gluetun:
281 condition: service_healthy
282
283 # Environment Configuration
284 env_file:
285 - .env
286
287 # Use Gluetun network stack
288 network_mode: "service:gluetun"
289
290 # Volume Mounts
291 volumes:
292 - {{ cleanuparr_config_dir }}:/config
293 - {{ arr_downloads_dir }}:/downloads
294
295 # Health Check
296 healthcheck:
297 test: ["CMD", "curl", "-f", "http://localhost:{{ cleanuparr_port }}/health"]
298 interval: {{ health_check_interval }}
299 timeout: {{ health_check_timeout }}
300 retries: {{ health_check_retries }}
301 start_period: {{ health_check_start_period }}
302
303{% endif %}
304
305networks:
306 {{ storage_docker_network }}:
307 external: true
308 {{ arr_docker_network }}:
309 external: true
310