ON_OFF Phase 0-3: service-controller (.13:8443, token-gated, containers+systemd-user, audit log) + portal toggle cards (live status, per-user who, failed token, RAM) — full E2E verified

This commit is contained in:
2026-10-08 19:10:45 +11:00
parent bb2c6e5d0d
commit 85827be3be
15 changed files with 549 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# service-controller — host-side on/off API. Runs as a systemd USER unit.
set -a; [ -f /home/sam/.config/environment.d/10-secrets.conf ] && . /home/sam/.config/environment.d/10-secrets.conf; set +a
export SC_TOKEN="${SC_TOKEN:-}"
export SC_SERVICES="${SC_SERVICES:-/home/sam/service-controller/services.toml}"
export SC_AUDIT="${SC_AUDIT:-/home/sam/service-controller/audit.log}"
# Bind to the docker bridge gateway so the portal container can reach us via
# host.docker.internal. NOT reachable from the LAN; token still required.
export SC_HOST="${SC_HOST:-192.168.144.1}"
exec "${VENV:-/home/sam/service-controller/.venv}/bin/python" \
/home/sam/service-controller/service_controller.py