docs(deploy): UI Service deployment, auth, and operations profiles

Bead archie-core-8cda.5.5:

- task dev now runs archie-ui (dev:dashboard) on :8484 -- after the
  cutover archied binds no dashboard listener, and Vite's /api,/events
  proxy needs a live receiver there. dev:mobile starts archie-ui with a
  LAN bind and -token-file (reusing the pre-cutover token path) instead
  of a mobile archied overlay; dev:ui's summary points at archie-ui.
- deployments/dev.toml documents itself as the archie-ui overlay and
  states the [services.gateway] target explicitly.
- systemd-user-service.md: the auth gap is now the documented posture --
  archie-ui has no secret registry, resolves GATEWAY_TOKEN/
  STATE_STORE_TOKEN from its process environment only, so the starter
  (EnvironmentFile) exports them; worked env-file example added, plus
  /healthz as the token-free liveness probe.
- INSTRUCTIONS.md ships five binaries with archie-ui in the quickstart
  and the token story; README.md carries the auth note; the
  docker-nats-stack profile notes archie-ui binds [web] and dials the
  same [services.*] targets.
- release tooling: archied's component closure extends with
  cmd/archie-ui and internal/app/archieui, so a UI-process-only commit
  can no longer fall between the two changelogs; RELEASING.md documents
  that the UI Service ships inside the archied release.
This commit is contained in:
sam committed 2026-09-10 01:14:14 +10:00
1 parent fa1d3ee27d
commit dd2d3db1b2
10 files changed
+154 -42

No files matched your search

+27 -12
View File
@@ -1,12 +1,17 @@
# Running this distribution
This archive contains four linux/amd64 binaries:
This archive contains five linux/amd64 binaries:
- **`archied`** — the resident daemon: polls your forge for assigned issues
and dispatches them into sandboxed `archie-agent` containers.
and dispatches them into sandboxed `archie-agent` containers. It serves no
dashboard: the web UI is `archie-ui`'s process (UI cutover,
`archie-core-8cda.5.4`).
- **`archie-ui`** — serves the operator dashboard and the webhook capture
receiver, dialing the Gateway and State Store gRPC contracts. Reads only
`[services.*]`, `[web]` and `[capture]` from the shared `config.toml`.
- **`archie-gateway`** — serves the chat (`ChatContract`) surface `archied`
dials for Telegram/webhook chat. Runs as its own process; `archied` never
embeds a gateway.
and `archie-ui` dial for Telegram/webhook chat. Runs as its own process;
`archied` never embeds a gateway.
- **`archie-state-store`** — owns the single `archie.db` SQLite file behind
a gRPC contract. `archied` and `archie-gateway` are gRPC clients of it, not
owners of the database.
@@ -35,15 +40,25 @@ as a host binary. Pull it from GHCR: `ghcr.io/samcharles93/archie-agent`.
providers) and place any secrets in `~/.config/archie/env` or referenced
`secret://` locations.
3. Start the three processes, in order (`archie-state-store` and
`archie-gateway` first — `archied` dials both at startup):
3. Start the four processes, in order (`archie-state-store` and
`archie-gateway` first — `archied` and `archie-ui` dial both at startup):
```bash
./archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090 &
./archie-gateway -config ~/.config/archie/config.toml -listen 127.0.0.1:8585 &
./archied -config ~/.config/archie/config.toml
./archie-gateway -config ~/.config/archie/config.toml -listen 127.0.0.1:8585 &
./archie-ui -config ~/.config/archie/config.toml &
./archied -config ~/.config/archie/config.toml
```
Dashboard reachability comes from `[web].listen` (default
`127.0.0.1:8484`, which needs no dashboard token). For a non-loopback
bind pass `-listen` with `-token` or `-token-file` to mint and persist
one. `archie-ui` reads `GATEWAY_TOKEN` / `STATE_STORE_TOKEN` from its
process environment only — it has no secret registry, so when those
tokens live in a secret manager, whatever starts `archie-ui` must export
them into its environment (the `[services.*].target_token` values in
`config.toml` are the other supported source).
4. For a persistent, 24/7 deployment instead of a foreground run, follow the
systemd user-unit runbook:
<https://github.com/samcharles93/archie-core/blob/main/deployments/systemd-user-service.md>.
@@ -57,7 +72,7 @@ playbooks directory before pointing `archied` at it.
## Version
This archive's binaries are built from the `archied` release tag in its
filename; `archie-gateway`, `archie-state-store`, and `archie-playbooks`
ship at that same version rather than being independently tagged (see
`RELEASING.md` in the source repository for why only `archied` and
`archie-agent` are independently versioned).
filename; `archie-ui`, `archie-gateway`, `archie-state-store`, and
`archie-playbooks` ship at that same version rather than being independently
tagged (see `RELEASING.md` in the source repository for why only `archied`
and `archie-agent` are independently versioned).
+6
View File
@@ -75,6 +75,12 @@ A non-loopback `[web].listen` requires a dashboard token (`-token`, or
binding-dispatch loop in `archied` consumes what arrives from the shared
State Store.
Auth note: unlike `archied`, archie-ui has no secret registry --
`GATEWAY_TOKEN`/`STATE_STORE_TOKEN` resolve from its process environment
only (or from `[services.*].target_token` in `config.toml`), so whatever
starts archie-ui must export those tokens into its environment. See the UI
Service unit in `systemd-user-service.md` for the worked example.
```bash
# loopback (host-only agent)
archie-state-store -config ~/.config/archie/config.toml -listen 127.0.0.1:9090
+19 -3
View File
@@ -1,10 +1,26 @@
# Development overlay for `task dev` and `task dev:dashboard`.
#
# Match Vite's API/event proxy without changing the installed configuration.
# After the UI cutover (archie-core-8cda.5.4) the dashboard on :8484 is the
# archie-ui process's listener, not archied's; this overlay is what both
# `go run ./cmd/archied -config-overlay deployments/dev.toml` and
# `go run ./cmd/archie-ui -config-overlay deployments/dev.toml` read. Only
# [web], [services.*] and [capture] land in archie-ui; the daemon ignores
# [web] entirely.
[web]
listen = "127.0.0.1:8484"
# `task dev` also runs archie-state-store on its -listen default
# (127.0.0.1:9090, loopback, no token) via dev:state-store -- point archied
# and archie-gateway at it so a fresh dev checkout works without hand-editing
# the installed config.toml (docs/prds/state-store-contract.md §12 step 7).
# (127.0.0.1:9090, loopback, no token) via dev:state-store -- point archied,
# archie-gateway and archie-ui at it so a fresh dev checkout works without
# hand-editing the installed config.toml
# (docs/prds/state-store-contract.md §12 step 7).
[services.state]
target = "127.0.0.1:9090"
# `task dev` runs archie-gateway on its -listen default (127.0.0.1:8585,
# loopback, no token). Stated explicitly so the value archie-ui dials is
# visible next to the State Store one.
[services.gateway]
target = "127.0.0.1:8585"
+3
View File
@@ -74,6 +74,9 @@ max_uptime = "60m"
pull_policy = "missing"
[web]
# Bound by the archie-ui process (the host-run dashboard after the UI
# cutover, archie-core-8cda.5.4); it dials the [services.*] targets above --
# the bridge-gateway State Store address works from the host too.
listen = "127.0.0.1:8484"
# Trust X-Forwarded-Proto when fronted by a reverse proxy (e.g. Traefik)
# terminating TLS so dashboard mutations succeed with external HTTPS Origin.
+2 -1
View File
@@ -14,7 +14,8 @@ bot_email = "archie-bot@users.noreply.github.com"
diff_cap_lines = 400
# The Gateway Service owns conversational state and serves ChatContract over
# gRPC. Run archie-gateway alongside archied with this address.
# gRPC. Run archie-gateway alongside archied and archie-ui (the dashboard
# process dials it too) with this address.
[services.gateway]
target = "127.0.0.1:8585"
+30
View File
@@ -79,6 +79,21 @@ the Gateway and State Store targets already in it, and binds `[web].listen`.
A non-loopback bind requires a dashboard token (`-token`, or `-token-file` to
mint and persist one);
**Auth note (deliberate design, `archie-core-8cda.5.5`):** unlike `archied`,
`archie-ui` has no secret registry — it resolves `GATEWAY_TOKEN` and
`STATE_STORE_TOKEN` from its **process environment only** (or from the
`target_token` values in `config.toml`). Whatever starts `archie-ui` is
therefore responsible for exporting those tokens into its environment: keep
them in `~/.config/archie/env` (loaded by the `EnvironmentFile` line below),
not only in a secret manager. A deployment that authenticates `archied`
through bws/Vault but exports nothing for `archie-ui` leaves the dashboard
unable to dial its dependencies.
For supervision, `GET /healthz` on `[web].listen` is the process's liveness
probe (token-free by design); the authenticated readiness surface lives at
the dashboard's health endpoint behind the token. A watchdog can curl
`/healthz` without credentials.
```ini
[Unit]
Description=Archie UI Service
@@ -95,6 +110,21 @@ RestartSec=5s
WantedBy=default.target
```
Concretely, for a deployment whose dependency tokens live outside
`config.toml`, `~/.config/archie/env` carries the two names and the unit
loads it; the dashboard token itself comes from `-token-file` (there is no
environment variable for it):
```bash
# ~/.config/archie/env
GATEWAY_TOKEN=... # presented to archie-gateway
STATE_STORE_TOKEN=... # presented to archie-state-store
```
```ini
ExecStart=%h/.local/bin/archie-ui -config %h/.config/archie/config.toml -token-file %h/.local/share/archie/web-token
```
---
## 3. Enabling User Linger (`loginctl`)