From ce17320c97dca8be3a4e936d0457e6a6b37b126e Mon Sep 17 00:00:00 2001 From: rosa Date: Thu, 22 Jan 2026 14:04:52 +0100 Subject: [PATCH] feat(watchtower): add watchtower stack --- compose/watchtower/.env.example | 5 +++++ compose/watchtower/docker-compose.yml | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 compose/watchtower/.env.example create mode 100644 compose/watchtower/docker-compose.yml diff --git a/compose/watchtower/.env.example b/compose/watchtower/.env.example new file mode 100644 index 0000000..f540596 --- /dev/null +++ b/compose/watchtower/.env.example @@ -0,0 +1,5 @@ +WATCHTOWER_CLEANUP="true" +WATCHTOWER_SCHEDULE="0 0 4 * * ?" +WATCHTOWER_NOTIFICATION_URL="" +# Update only containers without a com.centurylinklabs.watchtower.scope label +WATCHTOWER_SCOPE="none" \ No newline at end of file diff --git a/compose/watchtower/docker-compose.yml b/compose/watchtower/docker-compose.yml new file mode 100644 index 0000000..3417798 --- /dev/null +++ b/compose/watchtower/docker-compose.yml @@ -0,0 +1,15 @@ +services: + watchtower: + image: containrrr/watchtower + container_name: watchtower + env_file: + - .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + TZ: "${TZ:-Europe/Rome}" + WATCHTOWER_CLEANUP: "${WATCHTOWER_CLEANUP:-false}" + WATCHTOWER_SCHEDULE: "${WATCHTOWER_SCHEDULE:?Schedule not set}" + WATCHTOWER_SCOPE: "${WATCHTOWER_SCOPE:-}" + WATCHTOWER_NOTIFICATION_URL: "${WATCHTOWER_NOTIFICATION_URL:-}" + restart: always \ No newline at end of file