Reach Gitea as git.DOMAIN on the LAN and drop the forwarder
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:
@@ -18,8 +18,9 @@
|
||||
# pinned to the same base images as backend/Dockerfile (golang:1.26) and
|
||||
# python/Dockerfile (python:3.12-slim). Bump them together.
|
||||
# - No `actions/checkout`. It is a JavaScript action and would need Node on
|
||||
# the host. The source is fetched with plain git instead, from the same
|
||||
# local Gitea SSH remote the deploy step has always used.
|
||||
# the host. The source is fetched with plain git instead, over Gitea's SSH
|
||||
# on its LXC (git.adam-french.co.uk:2222, pinned to the LAN IP in
|
||||
# stpvm's /etc/hosts).
|
||||
#
|
||||
# THE LIVE DIRECTORY IS NOT TOUCHED UNTIL TESTS PASS
|
||||
# The site runs out of /home/adamf/deploy/web_server. The test job never
|
||||
@@ -55,7 +56,7 @@ jobs:
|
||||
# parsed as shell.
|
||||
SHA: ${{ github.sha }}
|
||||
REF: ${{ github.ref }}
|
||||
REMOTE: ssh://git@localhost:2222/adamf/web_server.git
|
||||
REMOTE: ssh://git@git.adam-french.co.uk:2222/adamf/web_server.git
|
||||
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
|
||||
# Bare repo kept between runs so each fetch is incremental (the
|
||||
# history is ~140MB; a fresh clone per push would be slow on the
|
||||
@@ -151,7 +152,7 @@ jobs:
|
||||
run: |
|
||||
set -eu
|
||||
git config --global --add safe.directory /home/adamf/deploy/web_server
|
||||
git fetch ssh://git@localhost:2222/adamf/web_server.git main
|
||||
git fetch ssh://git@git.adam-french.co.uk:2222/adamf/web_server.git main
|
||||
# Deploy only the commit the test job just passed. If main
|
||||
# has moved on since this run started, FETCH_HEAD is a newer
|
||||
# commit that THIS run never tested — stop, and let that
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
# HOW IT RUNS
|
||||
# The same host-mode act_runner as deploy.yaml, so (as there) nothing but
|
||||
# git and docker is assumed on the host: Renovate runs from its own image.
|
||||
# --network host lets the container reach Gitea on localhost:3000, the port
|
||||
# the runner itself registers against, so this keeps working while Caddy or
|
||||
# the tunnel is down. RENOVATE_GIT_URL=endpoint matters for the same reason:
|
||||
# without it Renovate clones from the URL Gitea advertises, which is
|
||||
# ROOT_URL — the public https://…/gitea/ path.
|
||||
# --network host gives the container the host's /etc/hosts, which pins
|
||||
# git.adam-french.co.uk to the Gitea LXC's LAN IP, so it reaches Gitea on
|
||||
# :3000, the port the runner itself registers against, and keeps working
|
||||
# while the tunnel is down. RENOVATE_GIT_URL=endpoint matters for the same
|
||||
# reason: without it Renovate clones from the URL Gitea advertises, which is
|
||||
# ROOT_URL — the public https://git.adam-french.co.uk through Cloudflare.
|
||||
#
|
||||
# WHAT HAPPENS AFTER
|
||||
# Each update is pushed as a renovate/* branch, which triggers deploy.yaml's
|
||||
@@ -62,7 +63,7 @@ jobs:
|
||||
fi
|
||||
docker run --rm --pull always --network host \
|
||||
-e RENOVATE_PLATFORM=gitea \
|
||||
-e RENOVATE_ENDPOINT=http://localhost:3000/api/v1 \
|
||||
-e RENOVATE_ENDPOINT=http://git.adam-french.co.uk:3000/api/v1 \
|
||||
-e RENOVATE_GIT_URL=endpoint \
|
||||
-e RENOVATE_REPOSITORIES=adamf/web_server,adamf/stpgit \
|
||||
-e RENOVATE_TOKEN \
|
||||
|
||||
Reference in New Issue
Block a user