fix: configure Watchtower to only monitor agent container

Add WATCHTOWER_SCOPE=towerops environment variable to generated
docker-compose templates. This prevents Watchtower from monitoring
unrelated containers on the same Docker host (e.g., Dokku apps).

Without scope filtering, Watchtower would attempt to monitor all
containers with watchtower.enable=true label, causing warnings
for missing images and unnecessary monitoring overhead.
This commit is contained in:
Graham McIntire 2026-03-06 12:38:44 -06:00
parent d17b7baba4
commit 1d98cda79d
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -478,6 +478,7 @@
# Check for updates every 12 hours (43200 seconds)
- WATCHTOWER_POLL_INTERVAL=43200
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_SCOPE=towerops
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_LOG_LEVEL=info
# Use latest Docker API version

View file

@ -990,6 +990,7 @@ defmodule ToweropsWeb.HelpLive.Index do
environment:
- WATCHTOWER_POLL_INTERVAL=43200
- WATCHTOWER_LABEL_ENABLE=true
- WATCHTOWER_SCOPE=towerops
- WATCHTOWER_CLEANUP=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock]) %></code></pre>