@@ -186,6 +186,14 @@ services:
186186 LOG_HTML : ${FLARESOLVERR_LOG_HTML} # Toggle HTML logging
187187 CAPTCHA_SOLVER : ${FLARESOLVERR_CAPTCHA_SOLVER} # Specify captcha solver
188188
189+ # Define container healthcheck to verify FlareSolverr connectivity
190+ healthcheck :
191+ test : ["CMD-SHELL", "wget -qO- http://localhost:8191 | grep -q 'FlareSolverr'"] # Check if FlareSolverr UI is reachable
192+ interval : ${FLARESOLVERR_HEALTHCHECK_INTERVAL} # Run the check at this interval
193+ timeout : ${FLARESOLVERR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
194+ start_period : ${FLARESOLVERR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
195+ retries : 5 # Mark as unhealthy after 5 failures
196+
189197 #
190198 # Define the 'prowlarr' service for managing indexers
191199 #
@@ -200,12 +208,20 @@ services:
200208 volumes :
201209 - ${PROWLARR_CONFIG_PATH}:/config:rw # Database and Prowlarr configs
202210
211+ # Define container healthcheck to verify Prowlarr connectivity
212+ healthcheck :
213+ test : ["CMD-SHELL", "wget -qO- http://localhost:9696 | grep -q '<title>Prowlarr</title>'"] # Check if Prowlarr web UI is up
214+ interval : ${PROWLARR_HEALTHCHECK_INTERVAL} # Run the check at this interval
215+ timeout : ${PROWLARR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
216+ start_period : ${PROWLARR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
217+ retries : 5 # Mark as unhealthy after 5 failures
218+
203219 # Specify container service dependencies
204220 depends_on :
205221 gluetun :
206222 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
207223 flaresolverr :
208- condition : service_started # Ensure FlareSolverr is started
224+ condition : service_healthy # Wait until FlareSolverr is healthy
209225
210226 #
211227 # Define the 'qbittorrent' service for managing torrents
@@ -222,6 +238,14 @@ services:
222238 - ${QBITTORRENT_CONFIG_PATH}:/config:rw # Configuration files
223239 - ${HOST_DOWNLOADS_PATH}:/downloads:rw # Location of download managers output directory
224240
241+ # Define container healthcheck to verify qBittorrent connectivity
242+ healthcheck :
243+ test : ["CMD-SHELL", "wget -qO- http://localhost:8080 | grep -q '<title>qBittorrent</title>'"] # Check if qBittorrent web UI is reachable
244+ interval : ${QBITTORRENT_HEALTHCHECK_INTERVAL} # Run the check at this interval
245+ timeout : ${QBITTORRENT_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
246+ start_period : ${QBITTORRENT_HEALTHCHECK_START_PERIOD} # Grace period before checks start
247+ retries : 5 # Mark as unhealthy after 5 failures
248+
225249 # Specify container service dependencies
226250 depends_on :
227251 gluetun :
@@ -243,14 +267,22 @@ services:
243267 - ${HOST_DOWNLOADS_PATH}:/downloads:rw # Location of download managers output directory
244268 - ${HOST_MOVIES_PATH}:/movies:rw # Location of movie library on disk
245269
270+ # Define container healthcheck to verify Radarr connectivity
271+ healthcheck :
272+ test : ["CMD-SHELL", "wget -qO- http://localhost:7878 | grep -q '<title>Radarr</title>'"] # Check if Radarr web UI is reachable
273+ interval : ${RADARR_HEALTHCHECK_INTERVAL} # Run the check at this interval
274+ timeout : ${RADARR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
275+ start_period : ${RADARR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
276+ retries : 5 # Mark as unhealthy after 5 failures
277+
246278 # Specify container service dependencies
247279 depends_on :
248280 gluetun :
249281 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
250282 prowlarr :
251- condition : service_started # Ensure Prowlarr is started
283+ condition : service_healthy # Wait until Prowlarr is healthy
252284 qbittorrent :
253- condition : service_started # Ensure qBittorrent is started
285+ condition : service_healthy # Wait until qBittorrent is healthy
254286
255287 #
256288 # Define the 'sonarr' service for managing tv shows
@@ -268,14 +300,22 @@ services:
268300 - ${HOST_DOWNLOADS_PATH}:/downloads:rw # Location of download managers output directory
269301 - ${HOST_TV_PATH}:/tv:rw # Location of TV library on disk
270302
303+ # Define container healthcheck to verify Sonarr connectivity
304+ healthcheck :
305+ test : ["CMD-SHELL", "wget -qO- http://localhost:8989 | grep -q '<title>Sonarr</title>'"] # Check if Sonarr web UI is reachable
306+ interval : ${SONARR_HEALTHCHECK_INTERVAL} # Run the check at this interval
307+ timeout : ${SONARR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
308+ start_period : ${SONARR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
309+ retries : 5 # Mark as unhealthy after 5 failures
310+
271311 # Specify container service dependencies
272312 depends_on :
273313 gluetun :
274314 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
275315 prowlarr :
276- condition : service_started # Ensure Prowlarr is started
316+ condition : service_healthy # Wait until Prowlarr is healthy
277317 qbittorrent :
278- condition : service_started # Ensure qBittorrent is started
318+ condition : service_healthy # Wait until qBittorrent is healthy
279319
280320 #
281321 # Define the 'bazarr' service for managing subtitles
@@ -293,14 +333,22 @@ services:
293333 - ${HOST_MOVIES_PATH}:/movies:rw # Location of movies library on disk
294334 - ${HOST_TV_PATH}:/tv:rw # Location of TV library on disk
295335
336+ # Define container healthcheck to verify Bazarr connectivity
337+ healthcheck :
338+ test : ["CMD-SHELL", "wget -qO- http://localhost:6767 | grep -q '<title>Bazarr</title>'"] # Check if Bazarr web UI is reachable
339+ interval : ${BAZARR_HEALTHCHECK_INTERVAL} # Run the check at this interval
340+ timeout : ${BAZARR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
341+ start_period : ${BAZARR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
342+ retries : 5 # Mark as unhealthy after 5 failures
343+
296344 # Specify container service dependencies
297345 depends_on :
298346 gluetun :
299347 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
300348 sonarr :
301- condition : service_started # Ensure Sonarr is started
349+ condition : service_healthy # Wait until Sonarr is healthy
302350 radarr :
303- condition : service_started # Ensure Radarr is started
351+ condition : service_healthy # Wait until Radarr is healthy
304352
305353 #
306354 # Define the 'readarr' service for managing ebooks
@@ -318,14 +366,22 @@ services:
318366 - ${HOST_DOWNLOADS_PATH}:/downloads:rw # Location of download managers output directory
319367 - ${HOST_BOOKS_PATH}:/books:rw # Location of book library on disk
320368
369+ # Define container healthcheck to verify Readarr connectivity
370+ healthcheck :
371+ test : ["CMD-SHELL", "wget -qO- http://localhost:8787 | grep -q '<title>Readarr</title>'"] # Check if Readarr web UI is reachable
372+ interval : ${READARR_HEALTHCHECK_INTERVAL} # Run the check at this interval
373+ timeout : ${READARR_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
374+ start_period : ${READARR_HEALTHCHECK_START_PERIOD} # Grace period before checks start
375+ retries : 5 # Mark as unhealthy after 5 failures
376+
321377 # Specify container service dependencies
322378 depends_on :
323379 gluetun :
324380 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
325381 prowlarr :
326- condition : service_started # Ensure Prowlarr is started
382+ condition : service_healthy # Wait until Prowlarr is healthy
327383 qbittorrent :
328- condition : service_started # Ensure qBittorrent is started
384+ condition : service_healthy # Wait until qBittorrent is healthy
329385
330386 #
331387 # Define the 'overseerr' service for managing media library requests
@@ -453,11 +509,11 @@ services:
453509 gluetun :
454510 condition : service_healthy # Wait until Gluetun reports healthy VPN connection
455511 sonarr :
456- condition : service_started # Ensure Sonarr is started
512+ condition : service_healthy # Wait until Sonarr is healthy
457513 radarr :
458- condition : service_started # Ensure Radarr is started
514+ condition : service_healthy # Wait until Radarr is healthy
459515 qbittorrent :
460- condition : service_started # Ensure qBittorrent is started
516+ condition : service_healthy # Wait until qBittorrent is healthy
461517
462518 #
463519 # Define the 'speedtest-tracker' service for tracking internet speeds
0 commit comments