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