The compose file on gw-04 was migrated to registry-prefixed image
references (100.94.185.103:5000/clawmates/<svc>:latest), which lets
`docker compose up` pick up the pulled image directly. The old script
retagged each pulled image to `clawmates/<svc>:latest` as a bridge so
the previous compose file (which used bare names) would find it —
that step is now unnecessary and just added a small window where the
un-prefixed tag could diverge from the registry.
Drift check now compares against the registry-prefixed tag directly.
`docker compose` v2 preferred with `docker-compose` v1 fallback stays.
Two fixes needed to make the timer actually roll correctly on gw-04:
1. Drift check compares the running container's image ID against the
local `clawmates/<svc>:latest` tag, not just pre/post-pull digests.
The pre/post check only catches new pulls — if a previous roll failed
between the retag and `docker compose up` (e.g. compose CLI failed),
the tag was updated but the container wasn't, and the next tick saw
no drift and silently left the stale container running. The
running-vs-tag check catches that case on the next tick.
2. Prefer `docker compose` (v2 plugin) but fall back to legacy
`docker-compose` (v1). GW-04 ships v1 only right now, and calling
`docker compose up -d` failed with "unknown shorthand flag: 'd'"
because docker had no `compose` subcommand at all. The fallback
keeps the script portable when the stack moves to a host with v2.
Adds a `publish` job to ci.yml that fires only on green pushes to main. It
builds broker, server, and frontend from images/*.Dockerfile, tags each with
:main-<sha> + :latest, and pushes to the fleet registry at
redclaw-web-01:5000 (via its Tailscale IP 100.94.185.103, which the daemons
already trust in insecure-registries).
Adds a small systemd oneshot + 1-minute timer for gw-04 that polls :latest
of each service, pulls on drift, retags to the un-prefixed name the current
compose file uses, and rolls only the changed services. The retag keeps
/root/clawmates/docker-compose.yml unchanged for now — a follow-up can
migrate the compose file to registry-prefixed names once we're confident.
End-to-end: push to main -> tests -> images pushed -> gw-04 timer pulls
within ~1 min -> prod updated. Rollback = docker tag <old-sha> :latest and
`docker compose up -d`.