Point docs and the setup page at stpvm, the new CI host
Test and publish / test (push) Successful in 2m25s
Test and publish / publish (push) Failing after 50s

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 <[email protected]>
This commit is contained in:
2026-10-15 17:58:03 +01:00
co-authored by Claude Opus 5.5
parent 4a07f54884
commit 62f812403a
4 changed files with 15 additions and 13 deletions
+6 -5
View File
@@ -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 :<sha> 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"
+3 -3
View File
@@ -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:<sha>` 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:<sha>` 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 \
+4 -3
View File
@@ -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 ./
+2 -2
View File
@@ -159,7 +159,7 @@ async function revoke(name: string) {
<button class="primary" :disabled="busy === 'hyprland'" @click="generate('hyprland', '', 'hyprland')">Generate key for this machine</button>
<KeyBox v-if="issued?.slot === 'hyprland'" :key="issued.key" :device="issued.device" :api-key="issued.key" />
<h3>1. Install the agent</h3>
<CodeBlock>git clone ssh://git@stppi.tailf20278.ts.net:2222/adamf/ccp.git && cd ccp
<CodeBlock>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</CodeBlock>
<h3>2. Configure and start it</h3>
<CodeBlock>mkdir -p ~/.config/hypr-agent
@@ -223,7 +223,7 @@ listener {
</Collector>
<Collector id="goals" title="Goals" hint="daily targets on the dashboard" v-model:open="open.goals">
<p>Managed on the Pi. An empty label matches every label of that kind.</p>
<p>Managed on the server. An empty label matches every label of that kind.</p>
<CodeBlock>docker exec activity-tracker tracker goal add --kind tab_focus --label youtube.com --op '&lt;=' --target 1h
docker exec activity-tracker tracker goal add --kind walk --op '&gt;=' --target 30m
docker exec activity-tracker tracker goal list