Roll the site onto each new image from CI
Test and publish / test (push) Successful in 46s
Test and publish / publish (push) Successful in 5s

After publishing, the publish job now pulls the image into the web_server
stack on the Pi and recreates only the jobs container, under the same
flock the site's own deploys and the .env applier take. It then waits for
the image's healthcheck and fails the run, with the container's last log
lines, if the tracker does not come up. Pinning JOBS_IMAGE_TAG in the
site's .env still holds a version, since compose pulls the pinned tag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 17:35:18 +01:00
co-authored by Claude Opus 5.5
parent 0d31332033
commit ef38679a45
2 changed files with 43 additions and 8 deletions
+4 -4
View File
@@ -66,15 +66,15 @@ The site's `docker-compose.yml` runs the published image as service `jobs`, with
### Deploying
A push to `main` here runs `.gitea/workflows/ci.yaml`. It tests, then builds and pushes `adam-french.co.uk/adamf/job-tracker:<sha>` and `:latest`.
A push to `main` here runs `.gitea/workflows/ci.yaml`. It tests, builds and pushes `adam-french.co.uk/adamf/job-tracker:<sha>` and `:latest`, then rolls the site onto the new image and waits for the container's healthcheck. A tracker that does not come up healthy fails the run, with its last log lines in the output.
To roll the site onto a new image:
The roll-out is the same command you would run by hand on the Pi:
```
cd ~/deploy/web_server && docker compose pull jobs && docker compose up -d jobs
cd ~/deploy/web_server && docker compose pull jobs && docker compose up -d --no-deps jobs
```
To pin a version instead of `latest`, set `JOBS_IMAGE_TAG=<sha>` in the site's `.env`.
To pin a version, set `JOBS_IMAGE_TAG=<sha>` in the site's `.env`. While it is pinned, pushes here still publish but change nothing live. To roll back, pin the last good sha.
### One-off: registry setup