Pin update.sh to a specific version, never :latest (ADR-0051)

:latest is three independently-mutable registry tags with no cross-image
transaction -- update.sh pulling it directly could observe a torn set
mid-promotion (api already retagged, ui/proxy not yet). latest-version.json
is a single, atomically-committed pointer that argus-appliance's release
pipeline only ever writes AFTER every image it names has finished
promoting, so resolving it first cannot observe a partial release: by the
time it names a version, that version is already guaranteed complete.

docker-compose.yml: image tags now ${ARGUS_VERSION:-latest} -- default
unchanged for manual/non-update.sh use (plain `docker compose pull` with
no env var set behaves exactly as before).

update.sh: resolves latest-version.json first (fails loud and untouched if
unreachable/malformed, never falls back to :latest), exports ARGUS_VERSION
for its own docker compose calls only (not written to .env), and -- new --
verifies every service's actual running image tag matches the target
version before declaring success, not just that the API container itself
reports healthy. A torn pull (network hiccup, disk full on one image) is
now a loud failure instead of a silently-reported success.
This commit is contained in:
root
2026-08-07 12:56:59 +00:00
parent c11f8a4a3d
commit 0e677d5257
2 changed files with 74 additions and 11 deletions
+10 -3
View File
@@ -92,7 +92,12 @@ services:
# Go API Server
api:
image: git-cloud.weboria.eu/weboria/argus-api:latest
# ARGUS_VERSION is set by update.sh before `docker compose pull`, pinned
# to a specific already-fully-promoted version tag rather than the
# floating :latest (ADR-0051 -- argus-appliance repo). Manual/non-
# update.sh use (plain `docker compose pull`, no env var set) is
# unaffected: the default is :latest, identical to before this change.
image: git-cloud.weboria.eu/weboria/argus-api:${ARGUS_VERSION:-latest}
container_name: argus-api
restart: unless-stopped
# Container hardening: no-new-privileges blocks setuid privilege
@@ -180,7 +185,8 @@ services:
# React UI (Admin Panel), served over HTTPS
ui:
image: git-cloud.weboria.eu/weboria/argus-ui:latest
# See the api service's own comment above -- same ADR-0051 pinning.
image: git-cloud.weboria.eu/weboria/argus-ui:${ARGUS_VERSION:-latest}
container_name: argus-ui
restart: unless-stopped
security_opt:
@@ -206,7 +212,8 @@ services:
# Nginx reverse proxy — host network mode, so real client IPs are visible
# directly without needing PROXY protocol.
nginx:
image: git-cloud.weboria.eu/weboria/argus-proxy:latest
# See the api service's own comment above -- same ADR-0051 pinning.
image: git-cloud.weboria.eu/weboria/argus-proxy:${ARGUS_VERSION:-latest}
container_name: argus-proxy
restart: always
network_mode: host