Correct and extend folder docs for Docker Essentials, Watchdogs, Media and Arrs Stack
The docs had drifted from the scripts — a script that no longer exists, three wrong variable names, a reversed run order, and seven scheduled scripts that were never documented at all.
This commit is contained in:
@@ -178,12 +178,28 @@ windows so any downtime from restarts is absorbed by the window that's already h
|
||||
|
||||
---
|
||||
|
||||
### 🔄 Image Currency — `docker_update.sh` + `docker_update_remaining.sh`
|
||||
### 🔄 Image Currency — `docker_update.sh`
|
||||
|
||||
Keeps all container images current without manual intervention. Daily updates for the
|
||||
auth/proxy stack (the containers that restart daily anyway — no extra downtime). Weekly
|
||||
remainder pass for everything else — derives the target list automatically from `docker ps`
|
||||
minus what was already updated, so there is no second list to maintain.
|
||||
One script, three modes — there is no separate remainder script.
|
||||
|
||||
| Mode | Targets | Runs |
|
||||
|------|---------|------|
|
||||
| *(default)* | `DAILY_RESTART_CONTAINERS` | Daily, **before** `docker_daily_restart.sh` |
|
||||
| `--weekly` | `WEEKLY_RESTART_CONTAINERS` | Weekly, **before** `docker_weekly_restart.sh` |
|
||||
| `--remainder` | Everything running that is in neither list | Monthly, via `monthly_maintenance.sh` |
|
||||
|
||||
The update always runs *before* its matching restart, so the restart lands on the freshly
|
||||
pulled image. Reversing that order would restart onto the old image and leave the new one
|
||||
sitting unused until the next window.
|
||||
|
||||
Each mode reuses the restart list it pairs with rather than maintaining its own — add a
|
||||
container to `DAILY_RESTART_CONTAINERS` once and it gets both the restart and the image pull.
|
||||
Remainder mode needs no list at all: it derives its targets from `docker ps` minus the daily
|
||||
list, the weekly list, the emby/critical-data sync-window profiles, and the fallback tiers.
|
||||
|
||||
Fallback containers are deliberately excluded from remainder mode. This server only runs them
|
||||
during a fallback; the remote owns their version. Updating them here would risk the remote's
|
||||
older image meeting data written by a newer one after a handback.
|
||||
|
||||
---
|
||||
|
||||
@@ -229,7 +245,7 @@ full coordination model between all four watchdogs.
|
||||
|--------|------|-------------|
|
||||
| `docker_daily_restart.sh` | Nightly proactive restart of degradation-prone containers | 1am via `daily_sync_maintenance.sh` |
|
||||
| `docker_weekly_restart.sh` | Weekly restart of less-critical services | 2:30am Sunday via `weekly_sync_maintenance.sh` |
|
||||
| `docker_update.sh` | Container image updates — daily list + weekly remainder mode | Daily before restart; weekly remainder pass |
|
||||
| `docker_update.sh` | Container image updates — three modes (default / `--weekly` / `--remainder`) | Daily and weekly before each restart; monthly for the remainder |
|
||||
| `docker_network_connect.sh` | Network existence + container connection enforcement | Every array start |
|
||||
| `docker_container_stop.sh` | Ordered container shutdown — graceful then forced | Called by `array_stopping.sh` |
|
||||
| `downloaders_reset.sh` | Download client hygiene — slskd / SABnzbd / qBittorrent | Every 30min via `critical_sync_maintenance.sh` |
|
||||
@@ -257,8 +273,13 @@ Daily maintenance window (1am):
|
||||
|
||||
Weekly maintenance window (2:30am Sunday):
|
||||
weekly_sync_maintenance.sh
|
||||
├── docker_weekly_restart.sh ──── restart less-critical services
|
||||
└── docker_update.sh --remainder ─ update containers not in managed lists
|
||||
├── docker_update.sh --weekly ─── pull latest (WEEKLY_RESTART_CONTAINERS)
|
||||
└── docker_weekly_restart.sh ──── restart onto the fresh image
|
||||
|
||||
Monthly maintenance window:
|
||||
monthly_maintenance.sh
|
||||
├── docker_update.sh --remainder update everything not in the managed lists
|
||||
└── Tools/docker_prune_images.sh --all
|
||||
|
||||
Critical maintenance window (every 30min):
|
||||
critical_sync_maintenance.sh
|
||||
@@ -266,5 +287,39 @@ Critical maintenance window (every 30min):
|
||||
|
||||
Array stopping:
|
||||
array_stopping.sh
|
||||
└── docker_container_stop.sh ──── ordered graceful shutdown
|
||||
└── docker_container_stop.sh ──── ordered graceful shutdown, verified per container
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ━━━ SAFEGUARDS COMMON TO THIS FOLDER ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
|
||||
Every script here talks to the Docker daemon, so they share the same protections. Each
|
||||
script's own header documents its full set; these are the ones worth knowing folder-wide.
|
||||
|
||||
**Daemon health is checked, not assumed.** A hung daemon returns an empty container list,
|
||||
which is indistinguishable from "no containers running". Without the check,
|
||||
`docker_container_stop.sh` would report a clean shutdown that never happened, and
|
||||
`docker_update.sh --remainder` would report "nothing to update" while doing nothing.
|
||||
|
||||
**Every docker call is timeout-wrapped.** A wedged daemon cannot stall a maintenance window
|
||||
or hold a lock open. The one deliberate exception is `docker pull` — a large image
|
||||
legitimately outlasts any sane timeout, and killing it mid-layer wastes the transfer.
|
||||
|
||||
**State is respected.** Running containers get restarted; stopped ones stay stopped. A
|
||||
stopped container was almost certainly stopped on purpose, and none of these scripts has the
|
||||
authority to overrule that.
|
||||
|
||||
**Restarts are verified, not assumed.** After each restart the container is re-checked once
|
||||
it has had time to settle. A container that starts and immediately crashes is recorded as a
|
||||
failure and notified — a restart that did not stick is never reported as success.
|
||||
|
||||
**Dependency ordering is shared with the watchdog.** Restarts follow
|
||||
`HOST*_WATCHDOG_DEPENDENCIES`, with `CONTAINER_DELAY` between a dependency and its dependents,
|
||||
so a dependent is never brought up while what it needs is still initialising.
|
||||
|
||||
**Locks prevent overlap.** Long windows can outlast their interval;
|
||||
`downloaders_reset.sh` uses wait-mode because it runs every 30 minutes and the previous pass
|
||||
may still be finishing.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user