/
/
/
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 context: .
152 args:
153 BASE_IMAGE: "{{ lazylibrarian_image }}:{{ lazylibrarian_version }}"
154 image: {{ lazylibrarian_custom_image }}
155{% else %}
156 image: {{ lazylibrarian_image }}:{{ lazylibrarian_version }}
157{% endif %}
158 container_name: lazylibrarian
159 restart: unless-stopped
160 depends_on:
161 gluetun:
162 condition: service_healthy
163
164 # Environment Configuration
165 env_file:
166 - .env
167
168 environment:
169 - DOCKER_MODS=linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg
170 - PUID={{ storage_uid }}
171 - PGID={{ storage_gid }}
172
173 # Use Gluetun network stack
174 network_mode: "service:gluetun"
175
176 # Volume Mounts
177 volumes:
178 - {{ lazylibrarian_config_dir }}:/config
179 - {{ lazylibrarian_books_dir }}:/books
180 - {{ arr_downloads_dir }}:/downloads
181
182{% endif %}
183
184{% if jellyseer_enabled %}
185 jellyseer:
186 image: {{ jellyseer_image }}:{{ jellyseer_version }}
187 container_name: jellyseer
188 restart: unless-stopped
189
190 # Dependencies
191 depends_on:
192 gluetun:
193 condition: service_healthy
194
195 # Environment Configuration
196 env_file:
197 - .env
198
199 # Use Gluetun network stack
200 network_mode: "service:gluetun"
201
202 # Volume Mounts
203 volumes:
204 - {{ jellyseer_config_dir }}:/app/config
205
206{% endif %}
207
208{% if flaresolverr_enabled %}
209 flaresolverr:
210 image: {{ flaresolverr_image }}:{{ flaresolverr_version }}
211 container_name: flaresolverr
212 restart: unless-stopped
213 depends_on:
214 gluetun:
215 condition: service_healthy
216
217 # Environment Configuration
218 env_file:
219 - .env
220
221 # Use Gluetun network stack
222 network_mode: "service:gluetun"
223
224 # Volume Mounts
225 volumes:
226 - {{ flaresolverr_config_dir }}:/app/config
227
228{% endif %}
229
230{% if qbittorrent_enabled %}
231 qbittorrent:
232 image: {{ qbittorrent_image }}:{{ qbittorrent_version }}
233 container_name: qbittorrent
234 restart: unless-stopped
235 depends_on:
236 gluetun:
237 condition: service_healthy
238
239 # Environment Configuration
240 env_file:
241 - .env
242
243 # Use Gluetun network stack
244 network_mode: "service:gluetun"
245
246 # Volume Mounts
247 volumes:
248 - {{ qbittorrent_config_dir }}:/config
249 - {{ qbittorrent_downloads_dir }}:/downloads
250
251{% endif %}
252
253{% if lidarr_enabled %}
254 lidarr:
255 image: {{ lidarr_image }}:{{ lidarr_version }}
256 container_name: lidarr
257 restart: unless-stopped
258 depends_on:
259 gluetun:
260 condition: service_healthy
261
262 # Environment Configuration
263 env_file:
264 - .env
265
266 # Use Gluetun network stack
267 network_mode: "service:gluetun"
268
269 # Volume Mounts
270 volumes:
271 - {{ lidarr_config_dir }}:/config
272 - {{ lidarr_music_dir }}:/music
273 - {{ arr_downloads_dir }}:/downloads
274
275{% endif %}
276
277{% if cleanuparr_enabled %}
278 cleanuparr:
279 image: {{ cleanuparr_image }}:{{ cleanuparr_version }}
280 container_name: cleanuparr
281 restart: unless-stopped
282 depends_on:
283 gluetun:
284 condition: service_healthy
285
286 # Environment Configuration
287 env_file:
288 - .env
289
290 # Use Gluetun network stack
291 network_mode: "service:gluetun"
292
293 # Volume Mounts
294 volumes:
295 - {{ cleanuparr_config_dir }}:/config
296 - {{ arr_downloads_dir }}:/downloads
297
298 # Health Check
299 healthcheck:
300 test: ["CMD", "curl", "-f", "http://localhost:{{ cleanuparr_port }}/health"]
301 interval: {{ health_check_interval }}
302 timeout: {{ health_check_timeout }}
303 retries: {{ health_check_retries }}
304 start_period: {{ health_check_start_period }}
305
306{% endif %}
307
308networks:
309 {{ storage_docker_network }}:
310 external: true
311 {{ arr_docker_network }}:
312 external: true
313