From e5fc1a3c32272746928b6feb8a5a6439b4c9182b Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 16 Jul 2024 10:13:24 +0200 Subject: [PATCH] Updated watchtower to check stopped containers --- watchtower/docker-compose.yaml | 8 +++----- watchtower/force.sh | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/watchtower/docker-compose.yaml b/watchtower/docker-compose.yaml index 38e6b88..072d5c6 100644 --- a/watchtower/docker-compose.yaml +++ b/watchtower/docker-compose.yaml @@ -1,5 +1,3 @@ -version: '3' - services: watchtower: container_name: watchtower @@ -8,9 +6,10 @@ services: environment: - TZ=${DOCKER_TZ} - WATCHTOWER_CLEANUP=true + - WATCHTOWER_INCLUDE_STOPPED=true - WATCHTOWER_POLL_INTERVAL=21600 - - WATCHTOWER_LABEL_ENABLE=false - - WATCHTOWER_MONITOR_ONLY=false + #- WATCHTOWER_LABEL_ENABLE=false + #- WATCHTOWER_MONITOR_ONLY=false - WATCHTOWER_NO_STARTUP_MESSAGE=true - WATCHTOWER_NOTIFICATIONS_LEVEL=info - WATCHTOWER_NOTIFICATIONS=email @@ -19,7 +18,6 @@ services: - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=mail.giorgioravera.it #- WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=25 #- WATCHTOWER_NOTIFICATION_EMAIL_SUBJECTTAG=Docker WatchTower - #privileged: true volumes: - /var/run/docker.sock:/var/run/docker.sock networks: diff --git a/watchtower/force.sh b/watchtower/force.sh index b35d1b2..c8a41cc 100755 --- a/watchtower/force.sh +++ b/watchtower/force.sh @@ -54,6 +54,7 @@ run_without_notifications() -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ --cleanup \ + --revive-stopped \ --run-once \ --no-startup-message } @@ -64,6 +65,7 @@ run_with_notifications() -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower \ --cleanup \ + --revive-stopped \ --run-once \ --no-startup-message \ --notifications=email \ -- 2.47.3