/
/
/
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
35 # Volume Mounts
36 volumes:
37 - {{ gluetun_config_dir }}:/gluetun
38
39 # Network (isolated arr network)
40 networks:
41 - {{ arr_docker_network }}
42
43 # Health Check
44 healthcheck:
45 test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://www.google.com"]
46 interval: 30s
47 timeout: 10s
48 retries: 3
49 start_period: 60s
50
51{% if sonarr_enabled %}
52 sonarr:
53 image: {{ sonarr_image }}:{{ sonarr_version }}
54 container_name: sonarr
55 restart: unless-stopped
56 depends_on:
57 gluetun:
58 condition: service_healthy
59
60 # Environment Configuration
61 env_file:
62 - .env
63
64 # Use Gluetun network stack
65 network_mode: "service:gluetun"
66
67 # Volume Mounts
68 volumes:
69 - {{ sonarr_config_dir }}:/config
70 - {{ sonarr_tv_dir }}:/shows
71 - {{ arr_downloads_dir }}:/downloads
72
73{% endif %}
74
75{% if bazarr_enabled %}
76 bazarr:
77 image: {{ bazarr_image }}:{{ bazarr_version }}
78 container_name: bazarr
79 restart: unless-stopped
80 depends_on:
81 gluetun:
82 condition: service_healthy
83
84 # Use Gluetun network stack
85 network_mode: "service:gluetun"
86
87 # Environment Configuration
88 env_file:
89 - .env
90
91 volumes:
92 - {{ bazarr_config_dir }}:/config
93 - {{ bazarr_shows_dir }}:/shows
94 - {{ bazarr_movies_dir }}:/movies
95
96{% endif %}
97
98{% if radarr_enabled %}
99 radarr:
100 image: {{ radarr_image }}:{{ radarr_version }}
101 container_name: radarr
102 restart: unless-stopped
103 depends_on:
104 gluetun:
105 condition: service_healthy
106
107 # Environment Configuration
108 env_file:
109 - .env
110
111 # Use Gluetun network stack
112 network_mode: "service:gluetun"
113
114 # Volume Mounts
115 volumes:
116 - {{ radarr_config_dir }}:/config
117 - {{ radarr_movies_dir }}:/movies
118 - {{ arr_downloads_dir }}:/downloads
119
120{% endif %}
121
122{% if prowlarr_enabled %}
123 prowlarr:
124 image: {{ prowlarr_image }}:{{ prowlarr_version }}
125 container_name: prowlarr
126 restart: unless-stopped
127 depends_on:
128 gluetun:
129 condition: service_healthy
130
131 # Environment Configuration
132 env_file:
133 - .env
134
135 # Use Gluetun network stack
136 network_mode: "service:gluetun"
137
138 # Volume Mounts
139 volumes:
140 - {{ prowlarr_config_dir }}:/config
141
142{% endif %}
143
144{% if lazylibrarian_enabled %}
145 lazylibrarian:
146{% if lazylibrarian_custom_build | default(false) %}
147 build: .
148 image: {{ lazylibrarian_custom_image }}
149{% else %}
150 image: {{ lazylibrarian_image }}:{{ lazylibrarian_version }}
151{% endif %}
152 container_name: lazylibrarian
153 restart: unless-stopped
154 depends_on:
155 gluetun:
156 condition: service_healthy
157
158 # Environment Configuration
159 env_file:
160 - .env
161
162 environment:
163 - DOCKER_MODS=linuxserver/mods:universal-calibre|linuxserver/mods:lazylibrarian-ffmpeg
164 - PUID={{ storage_uid }}
165 - PGID={{ storage_gid }}
166
167 # Use Gluetun network stack
168 network_mode: "service:gluetun"
169
170 # Volume Mounts
171 volumes:
172 - {{ lazylibrarian_config_dir }}:/config
173 - {{ lazylibrarian_books_dir }}:/books
174 - {{ arr_downloads_dir }}:/downloads
175
176{% endif %}
177
178{% if jellyseer_enabled %}
179 jellyseer:
180 image: {{ jellyseer_image }}:{{ jellyseer_version }}
181 container_name: jellyseer
182 restart: unless-stopped
183
184 # Dependencies
185 depends_on:
186 gluetun:
187 condition: service_healthy
188
189 # Environment Configuration
190 env_file:
191 - .env
192
193 # Use Gluetun network stack
194 network_mode: "service:gluetun"
195
196 # Volume Mounts
197 volumes:
198 - {{ jellyseer_config_dir }}:/config
199
200{% endif %}
201
202{% if flaresolverr_enabled %}
203 flaresolverr:
204 image: {{ flaresolverr_image }}:{{ flaresolverr_version }}
205 container_name: flaresolverr
206 restart: unless-stopped
207 depends_on:
208 gluetun:
209 condition: service_healthy
210
211 # Environment Configuration
212 env_file:
213 - .env
214
215 # Use Gluetun network stack
216 network_mode: "service:gluetun"
217
218 # Volume Mounts
219 volumes:
220 - {{ flaresolverr_config_dir }}:/app/config
221
222{% endif %}
223
224{% if qbittorrent_enabled %}
225 qbittorrent:
226 image: {{ qbittorrent_image }}:{{ qbittorrent_version }}
227 container_name: qbittorrent
228 restart: unless-stopped
229 depends_on:
230 gluetun:
231 condition: service_healthy
232
233 # Environment Configuration
234 env_file:
235 - .env
236
237 # Use Gluetun network stack
238 network_mode: "service:gluetun"
239
240 # Volume Mounts
241 volumes:
242 - {{ qbittorrent_config_dir }}:/config
243 - {{ qbittorrent_downloads_dir }}:/downloads
244
245{% endif %}
246
247{% if lidarr_enabled %}
248 lidarr:
249 image: {{ lidarr_image }}:{{ lidarr_version }}
250 container_name: lidarr
251 restart: unless-stopped
252 depends_on:
253 gluetun:
254 condition: service_healthy
255
256 # Environment Configuration
257 env_file:
258 - .env
259
260 # Use Gluetun network stack
261 network_mode: "service:gluetun"
262
263 # Volume Mounts
264 volumes:
265 - {{ lidarr_config_dir }}:/config
266 - {{ lidarr_music_dir }}:/music
267 - {{ arr_downloads_dir }}:/downloads
268
269{% endif %}
270
271networks:
272 {{ storage_docker_network }}:
273 external: true
274 {{ arr_docker_network }}:
275 external: true
276