From 1d98cda79d81dddff6af0522432f999a584d8760 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 6 Mar 2026 12:38:44 -0600 Subject: [PATCH] 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. --- lib/towerops_web/live/agent_live/index.html.heex | 1 + lib/towerops_web/live/help_live/index.ex | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/towerops_web/live/agent_live/index.html.heex b/lib/towerops_web/live/agent_live/index.html.heex index 0eb6922f..c8dd21d6 100644 --- a/lib/towerops_web/live/agent_live/index.html.heex +++ b/lib/towerops_web/live/agent_live/index.html.heex @@ -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 diff --git a/lib/towerops_web/live/help_live/index.ex b/lib/towerops_web/live/help_live/index.ex index 87eac4af..2f9aab97 100644 --- a/lib/towerops_web/live/help_live/index.ex +++ b/lib/towerops_web/live/help_live/index.ex @@ -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]) %>