Docs: stppriv uses this site's admin session; jobs DB is gone
The job tracker's database and role were dropped from this Postgres after moving to stppriv. stppriv gates its tools with this site's admin session rather than Cloudflare Access. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+3
-4
@@ -35,10 +35,9 @@
|
|||||||
# --- Postgres ----------------------------------------------------------------
|
# --- Postgres ----------------------------------------------------------------
|
||||||
# One instance, two databases: POSTGRES_DB for the Go backend and
|
# One instance, two databases: POSTGRES_DB for the Go backend and
|
||||||
# POSTGRES_TRACKER_DB for the activity tracker (with its own role). The job
|
# POSTGRES_TRACKER_DB for the activity tracker (with its own role). The job
|
||||||
# tracker's database moved to stppriv's own Postgres. Gitea's database
|
# tracker and Gitea have their own Postgres on stppriv and stpgit. Only
|
||||||
# is in the Gitea LXC's own Postgres. Only POSTGRES_DB is auto-created on first init; the others must
|
# POSTGRES_DB is auto-created on first init; the tracker database must be
|
||||||
# be created by hand on a fresh volume (the job-tracker and ccp READMEs have
|
# created by hand on a fresh volume (the ccp README has the commands).
|
||||||
# the commands).
|
|
||||||
# POSTGRES_HOST doubles as the db container's name.
|
# POSTGRES_HOST doubles as the db container's name.
|
||||||
POSTGRES_USER=
|
POSTGRES_USER=
|
||||||
POSTGRES_PASSWORD=
|
POSTGRES_PASSWORD=
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ certbot/www
|
|||||||
# Caddy's certificates, keys and ACME account (docker-compose.yml)
|
# Caddy's certificates, keys and ACME account (docker-compose.yml)
|
||||||
caddy/data/
|
caddy/data/
|
||||||
backend/token/
|
backend/token/
|
||||||
jobs-data/
|
|
||||||
usaco-data/
|
usaco-data/
|
||||||
.env
|
.env
|
||||||
.env.bak
|
.env.bak
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ Dockerized multi-service personal website self-hosted on `stpvm` (an x86-64 Ubun
|
|||||||
|
|
||||||
**Python API** (`python/`): FastAPI app served by uvicorn on port 8000. Caddy proxies `/py/` to it and strips the prefix, so routes in `python/app/main.py` are written relative to `/`. Swagger UI at `/py/docs`. Dev mode mounts `python/app` and runs uvicorn with `--reload`. **The site's Claude call lives here**, behind an internal route: `/internal/rowing/read` (behind `POST /api/rowing`). The Go backend calls it directly over the Docker network through `services.CallPython`, and Caddy 404s `/py/internal/`. The model is one setting, `CLAUDE_MODEL` (default `claude-sonnet-5-5`), set in `.env`; `python/app/claude.py` shapes the request per model. Adding another route is a short recipe in `python/README.md` ("Internal routes").
|
**Python API** (`python/`): FastAPI app served by uvicorn on port 8000. Caddy proxies `/py/` to it and strips the prefix, so routes in `python/app/main.py` are written relative to `/`. Swagger UI at `/py/docs`. Dev mode mounts `python/app` and runs uvicorn with `--reload`. **The site's Claude call lives here**, behind an internal route: `/internal/rowing/read` (behind `POST /api/rowing`). The Go backend calls it directly over the Docker network through `services.CallPython`, and Caddy 404s `/py/internal/`. The model is one setting, `CLAUDE_MODEL` (default `claude-sonnet-5-5`), set in `.env`; `python/app/claude.py` shapes the request per model. Adding another route is a short recipe in `python/README.md` ("Internal routes").
|
||||||
|
|
||||||
**Job tracker and notes editor** (on stppriv): the job tracker (`adamf/job-tracker`) and the SilverBullet editor run on their own LXC, from the `adamf/stppriv` repo, at `priv.<DOMAIN>` behind Cloudflare Access. Caddy here 301s `/sb/`, `/jobs/` and the old `/cv/jobs`, `/cv/leads` and userscript URLs there. stppriv is the notes vault's only writer; `silverbullet-git` here runs with `SYNC_MODE=pull` and feeds `/notes/`.
|
**Job tracker and notes editor** (on stppriv): the job tracker (`adamf/job-tracker`) and the SilverBullet editor run on their own LXC, from the `adamf/stppriv` repo, at `priv.<DOMAIN>`. stppriv's Caddy gates them with this site's admin session (the cookie is set for the parent domain), asking `/api/auth/validate-admin` over the LAN; requests from `STPPRIV_LAN_IP` to that path skip the api rate limit. Caddy here 301s `/sb/`, `/jobs/` and the old `/cv/jobs`, `/cv/leads` and userscript URLs there. stppriv is the notes vault's only writer; `silverbullet-git` here runs with `SYNC_MODE=pull` and feeds `/notes/`.
|
||||||
|
|
||||||
**Gitea** (own repo, `adamf/stpgit`): git, Actions and the image registry (`<DOMAIN>/adamf/...`) run in their own Proxmox LXC since 2026-11-24, from the `adamf/stpgit` repo (this repo's `gitea/` directory until then) with their own Postgres (`gitea-db`) and `.env`, deployed by hand there and never by CI. Everything on stpvm reaches it as `GITEA_HOST` (`git.<DOMAIN>`, :3000 HTTP and :2222 SSH), pinned to the LXC's LAN IP (`GITEA_UPSTREAM`) by `extra_hosts` in containers and `/etc/hosts` on the host; public DNS for that name is Cloudflare, which carries only HTTPS. There is no Gitea container or forwarder in this stack since 2026-11-24. The act_runner stays on stpvm. Runbook: that repo's README, summarised in "Gitea LXC" in `DEPLOYMENT.md` §7.
|
**Gitea** (own repo, `adamf/stpgit`): git, Actions and the image registry (`<DOMAIN>/adamf/...`) run in their own Proxmox LXC since 2026-11-24, from the `adamf/stpgit` repo (this repo's `gitea/` directory until then) with their own Postgres (`gitea-db`) and `.env`, deployed by hand there and never by CI. Everything on stpvm reaches it as `GITEA_HOST` (`git.<DOMAIN>`, :3000 HTTP and :2222 SSH), pinned to the LXC's LAN IP (`GITEA_UPSTREAM`) by `extra_hosts` in containers and `/etc/hosts` on the host; public DNS for that name is Cloudflare, which carries only HTTPS. There is no Gitea container or forwarder in this stack since 2026-11-24. The act_runner stays on stpvm. Runbook: that repo's README, summarised in "Gitea LXC" in `DEPLOYMENT.md` §7.
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -135,7 +135,8 @@ The config is `caddy/Caddyfile` (global options and snippets), `caddy/routes.cad
|
|||||||
activity tracker also checks the session itself. Its carve-outs, which a session
|
activity tracker also checks the session itself. Its carve-outs, which a session
|
||||||
cookie never reaches, stay public at the edge and are guarded by bearer tokens in the app:
|
cookie never reaches, stay public at the edge and are guarded by bearer tokens in the app:
|
||||||
`/tracker/api/v1/` and `/tracker/tracker.user.js`. `/sb/` and `/jobs/` 301 to stppriv
|
`/tracker/api/v1/` and `/tracker/tracker.user.js`. `/sb/` and `/jobs/` 301 to stppriv
|
||||||
(`priv.<DOMAIN>`, behind Cloudflare Access; see the `adamf/stppriv` README).
|
(`priv.<DOMAIN>`). Its Caddy gates them with this same admin session, asking
|
||||||
|
`/api/auth/validate-admin` over the LAN; see the `adamf/stppriv` README.
|
||||||
Paths are matched cleaned and case-insensitively, so `/TRACKER/` or `/uploads/x/../private/y`
|
Paths are matched cleaned and case-insensitively, so `/TRACKER/` or `/uploads/x/../private/y`
|
||||||
land on the gate too. With the backend down every gated path answers 502: it fails closed.
|
land on the gate too. With the backend down every gated path answers 502: it fails closed.
|
||||||
- **Permission gate.** `/receipt/` asks `/auth/validate/receipt` instead (the
|
- **Permission gate.** `/receipt/` asks `/auth/validate/receipt` instead (the
|
||||||
|
|||||||
Reference in New Issue
Block a user