From efcde97f39d3d674c2c5766075a3ccef749396c9 Mon Sep 17 00:00:00 2001 From: thethreemagi Date: Thu, 14 May 2026 20:40:22 +0100 Subject: [PATCH] Add Watchtower compose snippet --- compose-snippets/watchtower.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 compose-snippets/watchtower.yml diff --git a/compose-snippets/watchtower.yml b/compose-snippets/watchtower.yml new file mode 100644 index 0000000..fef1786 --- /dev/null +++ b/compose-snippets/watchtower.yml @@ -0,0 +1,21 @@ +# Watchtower — auto-pull updated images and restart containers +# Prerequisites: docker login git.thewichersfamily.com on the Pi first. +# +# To limit to specific containers only, add this label to them: +# com.centurylinklabs.watchtower.enable: "true" +# Then add WATCHTOWER_LABEL_ENABLE=true below. + +services: + watchtower: + image: containrrr/watchtower:latest + container_name: watchtower + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /root/.docker/config.json:/config.json:ro + environment: + - WATCHTOWER_POLL_INTERVAL=300 # check every 5 min + - WATCHTOWER_CLEANUP=true # remove old image layers after update + - WATCHTOWER_INCLUDE_STOPPED=false + # Optional ntfy notification on updates: + # - WATCHTOWER_NOTIFICATION_URL=generic+https://ntfy.thewichersfamily.com/watchtower