From 274ef53421aaaaf27ab2b4df59a0b0bede61144d Mon Sep 17 00:00:00 2001 From: Adrien Poupa Date: Fri, 10 Nov 2023 11:37:38 -0500 Subject: [PATCH] fix(qbittorrent): Monitor internet connectivity and restart container on failure --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a37a175..ea2cd24 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -239,7 +239,9 @@ services: - ${DOWNLOAD_ROOT}:/data/torrents restart: always healthcheck: - test: [ "CMD", "curl", "--fail", "http://127.0.0.1:8080" ] + # Container may fail if the PIA's token expired, so mark as unhealthy when there is no internet connection + # see: https://github.com/qdm12/gluetun/issues/641#issuecomment-933856220 + test: [ "CMD", "curl", "--fail", "http://127.0.0.1:8080", "https://google.com" ] interval: 5s retries: 10 network_mode: "service:vpn" @@ -287,7 +289,6 @@ services: - PORT_FORWARDING=1 - PORT_PERSIST=1 - PORT_SCRIPT=/pia-shared/portupdate-qbittorrent.sh - - EXIT_ON_FATAL=1 sysctls: - net.ipv4.conf.all.src_valid_mark=1 - net.ipv6.conf.default.disable_ipv6=1