Document the activity tracker's admin-gated pages
Test and deploy / test (push) Successful in 1m39s
Test and deploy / deploy (push) Successful in 26s

The tracker now gates its dashboard and new setup page on the site's
admin session, as jobs does. Pass it AUTH_VALIDATE_URL built from
BACKEND_HOST/PORT so it follows the backend if that is renamed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 21:27:02 +01:00
co-authored by Claude Opus 5.5
parent 746f20158e
commit 1b5c8fc4a9
3 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ backend icecast2 gitea sb sb-pub python | |
| silverbullet-git | n/a | n/a | none (timer loop) | no |
| python (FastAPI) | `${PYTHON_HOST}` | `${PYTHON_PORT}` | `/py/`, docs at `/py/docs` | no |
| jobs (job tracker, published image) | `jobs` | 8080 | `/jobs/` (admin-gated by the app itself) | no |
| activity-tracker (published image, adamf/ccp) | `activity-tracker` | 8080 | `/tracker/`, prefix stripped (per-device bearer keys) | no |
| activity-tracker (published image, adamf/ccp) | `activity-tracker` | 8080 | `/tracker/`, prefix stripped (collectors: per-device bearer keys; pages: admin-gated by the app itself) | no |
| icecast2 + liquidsoap | `${ICECAST_HOST}` | `${ICECAST_PORT}` | `/radio/` | **harbor port only** |
| gitea | `${GITEA_HOST}` | 3000, 2222 | `/gitea/` | **3000, 2222** |
| vue | `vue` | 5173 (dev only) | `/` (dev only) | no |
+9 -3
View File
@@ -481,9 +481,14 @@ services:
#
# Same shape as jobs: an explicit `environment:` list and a database role of
# its own, created by hand once (the ccp README has the command). It applies
# its own migrations on start. Collectors authenticate with per-device
# bearer keys made by `docker exec activity-tracker tracker apikey create`;
# nothing here touches the site's login. No state outside Postgres.
# its own migrations on start. No state outside Postgres.
#
# Two kinds of auth. Collectors send per-device bearer keys, made on the
# tracker's /tracker/setup page or with `docker exec activity-tracker
# tracker apikey create`. The dashboard and setup pages have no login of
# their own: like jobs, the tracker asks AUTH_VALIDATE_URL (the backend's
# validate-admin) with the visitor's cookies and sends anyone else to
# /admin/login.
activity-tracker:
image: adam-french.co.uk/adamf/activity-tracker:${ACTIVITY_TRACKER_IMAGE_TAG:-latest}
container_name: activity-tracker
@@ -496,6 +501,7 @@ services:
environment:
- DATABASE_URL=postgres://${POSTGRES_TRACKER_USER:-tracker}:${POSTGRES_TRACKER_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_TRACKER_DB:-tracker}?sslmode=disable
- TRACKER_TZ=${TRACKER_TZ:-}
- AUTH_VALIDATE_URL=http://${BACKEND_HOST}:${BACKEND_PORT}/auth/validate-admin
# Self-hosted git, served at /gitea/ and on port 3000 directly. Also the CI
# server: .gitea/workflows/deploy.yaml redeploys this whole stack on push to
+4 -1
View File
@@ -368,7 +368,10 @@
# ---- Activity tracker (/tracker/) ----
# Its own container (the adamf/ccp repo): an ingest API for device
# collectors, which send batches of events with a per-device bearer
# key. The app does its own auth, so no auth_request. Unlike /jobs/
# key, plus a dashboard and setup page. The app does its own auth, so
# no auth_request: the pages check the site session by asking the
# backend's validate-admin with the visitor's cookies, as /jobs/
# does, and /tracker.user.js is public. Unlike /jobs/
# the prefix IS stripped: the server serves /api/v1/... and /readyz
# from /. Collectors must use the www host: the apex 301 would turn
# their POSTs into GETs. Health Auto Export bodies can be several MB;