fix: prevent watchtower from checking images on container restart

Added --no-startup flag to Watchtower command in compose.yml.
Previously, Watchtower would check for image updates on every container
startup/restart. Now only runs at scheduled time (midnight daily).
This commit is contained in:
stellarshenson
2025-12-08 16:37:39 +01:00
parent 25efd91bb6
commit 861ea0cd8c
2 changed files with 4 additions and 1 deletions

View File

@@ -51,3 +51,6 @@ This journal tracks substantive work on documents, diagrams, and documentation c
16. **Task - Cleanup startup scripts**: Removed obsolete nvidia-smi script and renumbered ensure_groups<br>
**Result**: Deleted 01_nvidia-smi.sh (GPU detection now uses separate nvidia/cuda container spawned by jupyterhub_config.py), renamed 02_ensure_groups.py to 01_ensure_groups.py for sequential ordering, bumped version to 3.3.2
17. **Task - Fix Watchtower refresh frequency**: Investigated and fixed Watchtower running image checks on every container restart instead of daily<br>
**Result**: Added `--no-startup` flag to Watchtower command in compose.yml, preventing image refresh checks on container startup/restart - now only runs at scheduled midnight (cron `0 0 * * *`)

View File

@@ -98,7 +98,7 @@ services:
image: nickfedor/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw # to control docker and refresh images
command: --cleanup --schedule "0 0 * * *" # run every day at midnight
command: --cleanup --no-startup --schedule "0 0 * * *" # daily at midnight only, no check on startup
security_opt:
- seccomp:unconfined #optional
depends_on: