From 62f812403abea7dd412bf6d483b626bb869873ff Mon Sep 17 00:00:00 2001 From: Adam French Date: Thu, 15 Oct 2026 17:58:03 +0100 Subject: [PATCH] Point docs and the setup page at stpvm, the new CI host The site and its runner moved from the arm64 Pi (stppi) to stpvm (x86-64), so the clone URL and the comments about the build host and image architecture were wrong. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/ci.yaml | 11 ++++++----- README.md | 6 +++--- deploy/Dockerfile | 7 ++++--- web/src/views/Setup.vue | 4 ++-- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index b65ee4b..d22ecc5 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -2,7 +2,7 @@ # ci.yaml — test every push; publish an image for pushes to main that pass. # # Modelled on job-tracker's ci.yaml and run by the same runner: a self-hosted -# act_runner on the Pi (stppi) in HOST mode, with git and docker and no other +# act_runner on the web_server host (stpvm) in HOST mode, with git and docker and no other # toolchain. So Go runs in a `docker run` container, and the source is # fetched with plain git rather than actions/checkout (which needs Node on # the host). @@ -10,7 +10,7 @@ # TWO JOBS # test gofmt, go vet, staticcheck and go test (with the database # tests against a throwaway Postgres container), as `make check` -# minus -race, which the Pi can't run. Then the Vue app's +# minus -race (see the Go step). Then the Vue app's # typecheck and build, in a node container. # publish main only, after test: builds deploy/Dockerfile, pushes it to # this Gitea's container registry as : and :latest, then @@ -70,8 +70,9 @@ jobs: # Read-only source, and named volumes for the module and build # caches so repeat runs don't download everything again. No -race: - # the Pi's kernel has a 39-bit address space, which the race - # detector doesn't support on arm64. `make check` runs it locally. + # it was left out while CI ran on the arm64 Pi, whose 39-bit + # address space the race detector doesn't support, and has not + # been turned on since the move to x86-64. `make check` runs it. - name: Go - lint and test shell: bash run: | @@ -123,7 +124,7 @@ jobs: rm -rf "$SRC" && mkdir -p "$SRC" git --git-dir="$CACHE" archive --format=tar "$SHA" | tar -x -C "$SRC" printf '%s' "$REGISTRY_TOKEN" | docker login adam-french.co.uk -u "$REGISTRY_USER" --password-stdin - # Built natively on the Pi, so the image is arm64 — the only + # Built natively on the host, so the image is amd64 — the only # platform it runs on. docker build -f "$SRC/deploy/Dockerfile" -t "$IMAGE:$SHA" -t "$IMAGE:latest" "$SRC" docker push "$IMAGE:$SHA" diff --git a/README.md b/README.md index 5776140..b4e0c5e 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,11 @@ docker run -d -p 8080:8080 \ Put the service behind your reverse proxy (Caddy, Traefik and so on) for TLS, because API keys are sent as bearer tokens. -### Deploying to stppi +### Deploying to stpvm -Pushing to `main` on Gitea (`adamf/ccp`) runs `.gitea/workflows/ci.yaml` on the Pi's runner. The workflow runs the tests, pushes `adam-french.co.uk/adamf/activity-tracker:` and `:latest` to Gitea's container registry, and recreates the `activity-tracker` service in the web_server stack. The service is served at `https://www.adam-french.co.uk/tracker/`, so set collectors to `TRACKER_URL=https://www.adam-french.co.uk/tracker`. Use the `www` host because the apex redirect would turn uploaded POSTs into GETs. To hold a version, set `ACTIVITY_TRACKER_IMAGE_TAG` to a sha in web_server's `.env`. +Pushing to `main` on Gitea (`adamf/ccp`) runs `.gitea/workflows/ci.yaml` on the web_server host's runner. The workflow runs the tests, pushes `adam-french.co.uk/adamf/activity-tracker:` and `:latest` to Gitea's container registry, and recreates the `activity-tracker` service in the web_server stack. The service is served at `https://www.adam-french.co.uk/tracker/`, so set collectors to `TRACKER_URL=https://www.adam-french.co.uk/tracker`. Use the `www` host because the apex redirect would turn uploaded POSTs into GETs. To hold a version, set `ACTIVITY_TRACKER_IMAGE_TAG` to a sha in web_server's `.env`. -The repo needs the `REGISTRY_USER` and `REGISTRY_TOKEN` Actions secrets, the same ones job-tracker uses. Create its database role once on the Pi: +The repo needs the `REGISTRY_USER` and `REGISTRY_TOKEN` Actions secrets, the same ones job-tracker uses. Create its database role once on the host: ```sh docker exec db psql -U "$POSTGRES_USER" -d postgres \ diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 1fea856..c821a2d 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,8 +1,9 @@ # Build from the repo root: docker build -f deploy/Dockerfile -t activity-tracker . # -# Multi-arch by construction: all the base images are published for arm64, and -# the Pi's CI (.gitea/workflows/ci.yaml) builds natively there. No -# `RUN --mount` cache lines, so it also builds on the Pi's legacy builder. +# Multi-arch by construction: all the base images are published for amd64 and +# arm64, and CI (.gitea/workflows/ci.yaml) builds natively on whichever host +# runs it. No `RUN --mount` cache lines, so it also builds on Docker's legacy +# builder. FROM node:24-alpine AS web WORKDIR /src/web COPY web/package.json web/package-lock.json ./ diff --git a/web/src/views/Setup.vue b/web/src/views/Setup.vue index cb11a53..96ba2cb 100644 --- a/web/src/views/Setup.vue +++ b/web/src/views/Setup.vue @@ -159,7 +159,7 @@ async function revoke(name: string) {

1. Install the agent

-git clone ssh://git@stppi.tailf20278.ts.net:2222/adamf/ccp.git && cd ccp +git clone ssh://git@stpvm.tailf20278.ts.net:2222/adamf/ccp.git && cd ccp make install-agent # ~/.local/bin/hypr-agent and the systemd user unit

2. Configure and start it

mkdir -p ~/.config/hypr-agent @@ -223,7 +223,7 @@ listener { -

Managed on the Pi. An empty label matches every label of that kind.

+

Managed on the server. An empty label matches every label of that kind.

docker exec activity-tracker tracker goal add --kind tab_focus --label youtube.com --op '<=' --target 1h docker exec activity-tracker tracker goal add --kind walk --op '>=' --target 30m docker exec activity-tracker tracker goal list