From bfe2fe2782f53de2e0af621cdd19c2ad4af265b3 Mon Sep 17 00:00:00 2001 From: Adam French Date: Tue, 24 Nov 2026 20:54:30 +0000 Subject: [PATCH] Rename the repo to adamf/stpweb Point CI, Renovate, the CV links, tests and docs at adamf/stpweb and the deploy folder at ~/deploy/stpweb. Pin the Compose project name to web_server so the existing volumes and network keep their names. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/deploy.yaml | 20 ++++++++++---------- .gitea/workflows/maintenance.yaml | 6 +++--- .gitea/workflows/renovate.yaml | 2 +- DEPLOYMENT.md | 8 ++++---- Makefile | 2 +- backend/services/services_misc_test.go | 6 +++--- caddy/edge_test.sh | 6 +++--- docker-compose.yml | 3 +++ vue/src/views/CV/CVAnalyst.vue | 4 ++-- vue/src/views/CV/CVBackend.vue | 4 ++-- vue/src/views/CV/CVFrontend.vue | 4 ++-- vue/src/views/CV/CVSecurity.vue | 4 ++-- vue/src/views/CV/CVTemp.vue | 4 ++-- 13 files changed, 38 insertions(+), 35 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 339bdb8..c666495 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -16,11 +16,11 @@ jobs: # Via env so a branch name is never parsed as shell. SHA: ${{ github.sha }} REF: ${{ github.ref }} - REMOTE: ssh://git@git.adam-french.co.uk:2222/adamf/web_server.git + REMOTE: ssh://git@git.adam-french.co.uk:2222/adamf/stpweb.git GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no" # Kept between runs so fetches are incremental. - CACHE: /home/adamf/.cache/web_server-ci/repo.git - SRC: /home/adamf/.cache/web_server-ci/src-${{ github.sha }} + CACHE: /home/adamf/.cache/stpweb-ci/repo.git + SRC: /home/adamf/.cache/stpweb-ci/src-${{ github.sha }} steps: - name: Export the pushed commit to a scratch directory shell: bash @@ -48,8 +48,8 @@ jobs: docker run --rm \ -v "$SRC":/src:ro \ -w /src/backend \ - -v web_server_ci_gomod:/go/pkg/mod \ - -v web_server_ci_gobuild:/root/.cache/go-build \ + -v stpweb_ci_gomod:/go/pkg/mod \ + -v stpweb_ci_gobuild:/root/.cache/go-build \ golang:1.26 \ sh -c 'go vet ./... && go test ./...' @@ -61,7 +61,7 @@ jobs: docker run --rm \ -v "$SRC":/src:ro \ -w /src/python \ - -v web_server_ci_pip:/root/.cache/pip \ + -v stpweb_ci_pip:/root/.cache/pip \ -e PYTHONDONTWRITEBYTECODE=1 \ python:3.12-slim \ sh -c 'pip install --quiet --disable-pip-version-check --root-user-action=ignore -r requirements-dev.txt && python -m pytest tests -q -p no:cacheprovider' @@ -77,15 +77,15 @@ jobs: runs-on: self-hosted steps: - name: Pull changes - working-directory: /home/adamf/deploy/web_server + working-directory: /home/adamf/deploy/stpweb env: GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no" SHA: ${{ github.sha }} shell: bash run: | set -eu - git config --global --add safe.directory /home/adamf/deploy/web_server - git fetch ssh://git@git.adam-french.co.uk:2222/adamf/web_server.git main + git config --global --add safe.directory /home/adamf/deploy/stpweb + git fetch ssh://git@git.adam-french.co.uk:2222/adamf/stpweb.git main # Deploy only the tested commit; a newer main gets its own # run. This also stops a re-run rolling the site back. if [ "$(git rev-parse FETCH_HEAD)" != "$SHA" ]; then @@ -96,7 +96,7 @@ jobs: git reset --hard FETCH_HEAD - name: Run docker compose up - working-directory: /home/adamf/deploy/web_server + working-directory: /home/adamf/deploy/stpweb env: COMPOSE_BAKE: "false" # Shared with maintenance.yaml so the two never run compose at once. diff --git a/.gitea/workflows/maintenance.yaml b/.gitea/workflows/maintenance.yaml index a125097..8e9bc36 100644 --- a/.gitea/workflows/maintenance.yaml +++ b/.gitea/workflows/maintenance.yaml @@ -25,11 +25,11 @@ jobs: # .compose.lock is shared with deploy.yaml, so two compose runs # never race. Taken per step to keep deploys from waiting long. - name: Pull latest base images - working-directory: /home/adamf/deploy/web_server + working-directory: /home/adamf/deploy/stpweb run: flock .compose.lock docker compose pull - name: Rebuild and restart containers - working-directory: /home/adamf/deploy/web_server + working-directory: /home/adamf/deploy/stpweb run: flock .compose.lock docker compose up -d --build --remove-orphans - name: Prune unused Docker images @@ -40,7 +40,7 @@ jobs: - name: Show running containers run: docker compose ps - working-directory: /home/adamf/deploy/web_server + working-directory: /home/adamf/deploy/stpweb - name: Show disk usage after run: df -h / diff --git a/.gitea/workflows/renovate.yaml b/.gitea/workflows/renovate.yaml index bcdf855..4967a9c 100644 --- a/.gitea/workflows/renovate.yaml +++ b/.gitea/workflows/renovate.yaml @@ -30,7 +30,7 @@ jobs: -e RENOVATE_PLATFORM=gitea \ -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_REPOSITORIES=adamf/stpweb,adamf/stpgit \ -e RENOVATE_TOKEN \ -e GITHUB_COM_TOKEN \ -e LOG_LEVEL=info \ diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 0a99892..e716bbe 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -200,8 +200,8 @@ which has two jobs: `.compose.lock` flock, shared with the weekly maintenance workflow. The test job keeps state on the host outside the deploy checkout: a bare -repository cache at `/home/adamf/.cache/web_server-ci/` and three named -volumes (`web_server_ci_gomod`, `web_server_ci_gobuild`, `web_server_ci_pip`). +repository cache at `/home/adamf/.cache/stpweb-ci/` and three named +volumes (`stpweb_ci_gomod`, `stpweb_ci_gobuild`, `stpweb_ci_pip`). The weekly maintenance workflow's `docker image prune -af` removes the two toolchain images, so the first run after it pulls them again; the volumes survive. Maintenance takes the same flock around its compose steps. @@ -463,7 +463,7 @@ to be added to its allow-list as well as `.env.example`. **`.env` is edited by hand on the host**, in -`~/deploy/web_server`. Nothing syncs it from a laptop checkout, so a laptop's +`~/deploy/stpweb`. Nothing syncs it from a laptop checkout, so a laptop's `.env` (often with dev values) never reaches production by accident. An unset variable is not an error: compose substitutes an empty string, @@ -524,7 +524,7 @@ together. ## 7. Runbook All commands run from the deploy checkout on the host -(`~/deploy/web_server`) unless stated. +(`~/deploy/stpweb`) unless stated. **Deploy.** Normally automatic — push to `main` and the Gitea Actions runner does it. By hand: diff --git a/Makefile b/Makefile index 67de5ba..996ab4d 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ check-compose: # The image build runs `caddy validate` for both modes. check-caddy: - docker build -q -t web_server-caddy:check caddy/ + docker build -q -t stpweb-caddy:check caddy/ generate: cd backend && go run github.com/99designs/gqlgen generate diff --git a/backend/services/services_misc_test.go b/backend/services/services_misc_test.go index f26edbc..3fbd884 100644 --- a/backend/services/services_misc_test.go +++ b/backend/services/services_misc_test.go @@ -152,7 +152,7 @@ func TestParseCommitMessage(t *testing.T) { func TestGiteaFeedResponseDecoding(t *testing.T) { const fixture = `[{ "act_user": {"avatar_url": "http://gitea:3000/avatars/1", "login": "adamf"}, - "repo": {"full_name": "adamf/web_server", "html_url": "http://gitea:3000/adamf/web_server"}, + "repo": {"full_name": "adamf/stpweb", "html_url": "http://gitea:3000/adamf/stpweb"}, "op_type": "commit_repo", "content": "{\"Commits\":[{\"Message\":\"add tests\"}]}", "created": "2026-09-22T10:30:00Z", @@ -171,10 +171,10 @@ func TestGiteaFeedResponseDecoding(t *testing.T) { if got.ActUser.AvatarURL != "http://gitea:3000/avatars/1" { t.Errorf("AvatarURL = %q", got.ActUser.AvatarURL) } - if got.Repo.FullName != "adamf/web_server" { + if got.Repo.FullName != "adamf/stpweb" { t.Errorf("FullName = %q", got.Repo.FullName) } - if got.Repo.HTMLURL != "http://gitea:3000/adamf/web_server" { + if got.Repo.HTMLURL != "http://gitea:3000/adamf/stpweb" { t.Errorf("HTMLURL = %q", got.Repo.HTMLURL) } if got.OpType != "commit_repo" { diff --git a/caddy/edge_test.sh b/caddy/edge_test.sh index 05c5643..5d95de0 100755 --- a/caddy/edge_test.sh +++ b/caddy/edge_test.sh @@ -134,9 +134,9 @@ GIT_HOST=${BASE#*://} GIT="https://git.${GIT_HOST#www.}" must 301 "$GIT/" gitea /gitea must 301 "$GIT/" gitea /gitea/ -must 301 "$GIT/adamf/web_server/src/branch/main/README.md" gitea /gitea/adamf/web_server/src/branch/main/README.md -must 301 "$GIT/adamf/web_server.git/info/refs?service=git-upload-pack" gitea "/gitea/adamf/web_server.git/info/refs?service=git-upload-pack" -must 301 "$GIT/adamf/web_server/commit/0000000" gitea /gitea/adamf/web_server/commit/0000000 +must 301 "$GIT/adamf/stpweb/src/branch/main/README.md" gitea /gitea/adamf/stpweb/src/branch/main/README.md +must 301 "$GIT/adamf/stpweb.git/info/refs?service=git-upload-pack" gitea "/gitea/adamf/stpweb.git/info/refs?service=git-upload-pack" +must 301 "$GIT/adamf/stpweb/commit/0000000" gitea /gitea/adamf/stpweb/commit/0000000 echo "# bare prefixes and moved URLs" for p in /api /radio /dozzle /garage /notes /sb /py /jobs /usaco \ diff --git a/docker-compose.yml b/docker-compose.yml index 0e0f865..3b6475e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,9 @@ # Container names come from the *_HOST variables in .env, which Caddy also # uses for its upstreams, so the two always agree. +# Pinned to the old folder name: the volumes and network are named after it. +name: web_server + networks: # Subnet pinned so it cannot collide with the LAN. app-network: diff --git a/vue/src/views/CV/CVAnalyst.vue b/vue/src/views/CV/CVAnalyst.vue index d01224e..0e8f4d1 100644 --- a/vue/src/views/CV/CVAnalyst.vue +++ b/vue/src/views/CV/CVAnalyst.vue @@ -131,9 +131,9 @@ import Project from "./Project.vue"; diff --git a/vue/src/views/CV/CVBackend.vue b/vue/src/views/CV/CVBackend.vue index 61240ea..5048e21 100644 --- a/vue/src/views/CV/CVBackend.vue +++ b/vue/src/views/CV/CVBackend.vue @@ -66,9 +66,9 @@ import Project from "./Project.vue"; diff --git a/vue/src/views/CV/CVFrontend.vue b/vue/src/views/CV/CVFrontend.vue index 9d11007..8bb72a1 100644 --- a/vue/src/views/CV/CVFrontend.vue +++ b/vue/src/views/CV/CVFrontend.vue @@ -66,9 +66,9 @@ import Project from "./Project.vue"; diff --git a/vue/src/views/CV/CVSecurity.vue b/vue/src/views/CV/CVSecurity.vue index a0b260e..d5336d1 100644 --- a/vue/src/views/CV/CVSecurity.vue +++ b/vue/src/views/CV/CVSecurity.vue @@ -67,9 +67,9 @@ import Project from "./Project.vue"; diff --git a/vue/src/views/CV/CVTemp.vue b/vue/src/views/CV/CVTemp.vue index ee03566..e79e28c 100644 --- a/vue/src/views/CV/CVTemp.vue +++ b/vue/src/views/CV/CVTemp.vue @@ -65,9 +65,9 @@ import Project from "./Project.vue";