Add Watchtower compose snippet

This commit is contained in:
2026-05-14 20:40:22 +01:00
parent f6d602d5ea
commit efcde97f39
+21
View File
@@ -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