cron: dockcheck updates itself, and notifies for every container

- Install dockcheck as a git clone in ~/.local/share/dockcheck with
  AutoSelfUpdate (git pull also updates notify templates and urls.list);
  no pinned versions. regctl is refreshed weekly by run_dockcheck.sh.
- Since dockcheck ~v0.7, OnlyLabel skips unlabelled containers entirely, so
  they got no update notices. run_dockcheck.sh now runs twice: update
  labelled containers quietly, then check everything and notify once.
- Running dockcheck.sh by hand now checks everything and changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-03 07:30:32 -07:00
1 parent a5cdfded37
commit 62cdf879f5
4 files changed
+134 -104

No files matched your search

+23 -15
View File
@@ -11,26 +11,34 @@ jobs on the server, never on the machine running Ansible.
| 09:10 daily | root | `/usr/local/bin/update_warhammer_feed.sh`: Warhammer RSS feed |
### Dockcheck (container updates)
- Installs [dockcheck](https://github.com/mag37/dockcheck), its Gotify notify
templates, `urls.list` and `regctl` into `/home/phil/.local/bin/`, pinned
to `dockcheck_version` and `regctl_version` in `defaults/main.yml`. Bump
those and run `bin/deploy --tags cron` to upgrade.
- Templates `/home/phil/.config/dockcheck.config` from `dockcheck.config.j2`
- [dockcheck](https://github.com/mag37/dockcheck) is a git clone in
`/home/phil/.local/share/dockcheck`, linked as `~/.local/bin/dockcheck.sh`.
It updates itself every run (`AutoSelfUpdate`: `git pull`, which also
updates its notify templates and `urls.list`). Ansible only makes the first
clone.
- `regctl` (`~/.local/bin/regctl`), which dockcheck uses to query
registries, is refreshed weekly from its latest release by
`run_dockcheck.sh`.
- `/home/phil/.config/dockcheck.config` comes from `dockcheck.config.j2`
(Gotify token from `vault_dockcheck`).
- Settings: `OnlyLabel=true` and `AutoMode=true`, so containers labelled
`mag37.dockcheck.update=true` are pulled and recreated automatically; any
other container with an update gets a Gotify notice. `dawarich_db` and
`dawarich_redis` are skipped.
- At 08:00 `run_dockcheck.sh` runs dockcheck twice:
1. Update run: containers labelled `mag37.dockcheck.update=true` are
pulled and recreated. No notification.
2. Check run: every container is checked and one Gotify notice lists the
updates still waiting (unlabelled containers, and images held back by
`DaysOld`).
- `DaysOld=3`: images newer than 3 days wait for a later run.
- `BackupForDays=7`: the replaced image is kept for 7 days for rollback.
List backups with `dockcheck.sh -B` (or `docker images | grep _`);
to roll back, retag the backup and recreate the container.
- `run_dockcheck.sh` logs to `/var/log/dockcheck/dockcheck.log`, rotated
weekly (a year kept).
List backups with `dockcheck.sh -B`; to roll back, retag the backup and
recreate the container.
- `dawarich_db` and `dawarich_redis` are skipped.
- Logs go to `/var/log/dockcheck/dockcheck.log`, rotated weekly (a year
kept).
To see what needs updating by hand, run dockcheck on the server:
To see what needs updating by hand (checks everything, changes nothing,
sends nothing):
```bash
ssh phil@100.70.169.99 '~/.local/bin/dockcheck.sh -n'
ssh phil@100.70.169.99 '~/.local/bin/dockcheck.sh'
```
### Warhammer RSS feed