Move to stppriv: userscript at priv.<site>, CI stops deploying
The tracker now runs on stppriv behind Cloudflare Access. The userscript points at priv.adam-french.co.uk and migrates a saved www base, since www only 301s now (which drops a POST). CI publishes the image but no longer rolls stpvm's stack; stppriv is deployed by hand. Merge only at cutover, once priv.adam-french.co.uk/jobs/ is live. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -10,11 +10,12 @@
|
||||
# TWO JOBS
|
||||
# test go vet + go test, and a vite build of web/. The same checks as
|
||||
# `make check`.
|
||||
# publish main only, after test: builds the image, pushes it to this
|
||||
# Gitea's container registry as :<sha> and :latest, then pulls it
|
||||
# into the web_server stack (its `jobs` service) and waits for it
|
||||
# to be healthy. So a push to main goes live, as web_server's own
|
||||
# pushes do — see "Deploying" in README.md.
|
||||
# publish main only, after test: builds the image and pushes it to this
|
||||
# Gitea's container registry as :<sha> and :latest. It does NOT
|
||||
# deploy: the tracker runs on stppriv, which is deployed by hand
|
||||
# (`docker compose pull jobs && docker compose up -d jobs` in
|
||||
# ~/deploy/stppriv). The runner lives on stpvm and only deploys
|
||||
# stpvm.
|
||||
#
|
||||
# SECRETS (repo settings -> Actions -> Secrets)
|
||||
# REGISTRY_USER a Gitea user that can write packages for adamf
|
||||
@@ -118,35 +119,3 @@ jobs:
|
||||
if: always()
|
||||
shell: bash
|
||||
run: rm -rf "$SRC"
|
||||
|
||||
# Put the new image live. The runner is on the same host, so this is the
|
||||
# same `pull` + `up` you would type by hand in the site's deploy
|
||||
# directory. Only the `jobs` service is touched (--no-deps), and
|
||||
# compose recreates it only if the pulled image differs.
|
||||
#
|
||||
# Pinning still works: if the site's .env sets JOBS_IMAGE_TAG to a
|
||||
# sha, compose pulls and runs that tag, so this step changes
|
||||
# nothing until the pin is removed.
|
||||
#
|
||||
# flock takes .compose.lock, which web_server's deploy.yaml and
|
||||
# maintenance.yaml hold while they run compose, so this cannot
|
||||
# race a site deploy or the weekly rebuild.
|
||||
#
|
||||
# Then it waits for the image's HEALTHCHECK (process up, database
|
||||
# reachable). A tracker that will not start fails the run, which is
|
||||
# the signal to pin JOBS_IMAGE_TAG to the last good sha.
|
||||
- name: Roll the site onto the new image
|
||||
working-directory: /home/adamf/deploy/web_server
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
flock .compose.lock sh -c 'docker compose pull jobs && docker compose up -d --no-deps jobs'
|
||||
for i in $(seq 1 30); do
|
||||
status=$(docker inspect -f '{{.State.Health.Status}}' jobs)
|
||||
echo "jobs: $status"
|
||||
[ "$status" = healthy ] && exit 0
|
||||
[ "$status" = unhealthy ] && break
|
||||
sleep 5
|
||||
done
|
||||
docker logs --tail 50 jobs
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user