Reach Gitea as git.DOMAIN on the LAN and drop the forwarder
Test and deploy / test (push) Has been cancelled
Test and deploy / deploy (push) Has been cancelled

Everything on stpvm now reaches the Gitea LXC by its own name, GITEA_HOST
(git.DOMAIN), pinned to its LAN IP: by extra_hosts in caddy, backend, usaco
and silverbullet-git, and by /etc/hosts on the host for the runner, CI and
Renovate. Public DNS for that name is Cloudflare, which only carries HTTPS,
so the pin is what makes :3000 and :2222 work. The haproxy forwarder that
kept localhost:3000/2222 working is gone, so stpvm no longer publishes
those ports. The deploy and Renovate workflows and the runner script use
the new name; the docs and the rollback notes follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 17:28:58 +00:00
co-authored by Claude Opus 5.5
parent 180f6ac8b8
commit ed87d04e04
12 changed files with 90 additions and 142 deletions
+12 -8
View File
@@ -4,7 +4,7 @@
#
# WHAT IT DOES
# 1. Downloads the act_runner binary if it is not already present.
# 2. Blocks until Gitea answers on http://localhost:3000.
# 2. Blocks until Gitea answers on http://git.adam-french.co.uk:3000.
# 3. Registers with Gitea the first time only.
# 4. execs the runner daemon in the foreground.
#
@@ -19,9 +19,13 @@
# starting the daemon against a Gitea that is not up yet fails permanently
# rather than retrying, so the loop polls (forever, by design — there is no
# sensible timeout when the answer is "wait longer") until Gitea responds.
# It targets localhost:3000, the port docker-compose.yml publishes directly,
# NOT the public /gitea/ path through Caddy — so the runner keeps working
# even while TLS or Caddy is broken.
# It targets git.adam-french.co.uk:3000, Gitea's plain-HTTP port on its own
# LXC, which stpvm's /etc/hosts pins to the LXC's LAN IP — NOT the public
# https://git.adam-french.co.uk through Cloudflare — so the runner keeps
# working while the tunnel or the internet link is down. (It was
# localhost:3000, the forwarder's port, until 2026-11-24. An existing
# .runner keeps the address it registered with: edit its "address" field to
# move it, as was done then.)
#
# THE REGISTRATION TOKEN (one-shot, and easy to get wrong)
# GITEA_RUNNER_REGISTRATION_TOKEN comes from ./.env and is generated in the
@@ -51,18 +55,18 @@ if [ ! -f ./act_runner ]; then
bash "$(dirname "$0")/download.sh"
fi
echo "Waiting for localhost:3000 to respond..." >&2
echo "Waiting for git.adam-french.co.uk:3000 to respond..." >&2
while ! curl -sf http://localhost:3000 > /dev/null 2>&1; do
while ! curl -sf http://git.adam-french.co.uk:3000 > /dev/null 2>&1; do
sleep 2
done
echo "localhost:3000 is up." >&2
echo "git.adam-french.co.uk:3000 is up." >&2
if [ ! -f .runner ]; then
echo "No .runner file found. Registering runner..." >&2
./act_runner register --no-interactive \
--instance http://localhost:3000 \
--instance http://git.adam-french.co.uk:3000 \
--token "${GITEA_RUNNER_REGISTRATION_TOKEN}" \
--name "${GITEA_RUNNER_NAME:-pi-runner}" \
--labels self-hosted