Add Homepage dashboard + dual-export OpenCode traces

Homepage as the front door: single page at framework:7575 with one tile
per service, live widgets where the upstream supports it (Ollama loaded
models, container state via docker.sock, etc.), bookmarks for reference
docs. Config files are pyinfra-managed — source of truth lives in
compose/homepage/, sync by editing there and re-running ./run.sh.

OpenCode plugin now dual-exports spans to Phoenix and OpenLIT in
parallel. Phoenix remains the per-trace waterfall view; OpenLIT picks
up the same data for fleet-level metrics. Each destination has its own
batch processor so a hiccup at one doesn't block the other.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 12:00:05 -04:00
parent f23f7b8cc9
commit 178d7d3c0f
11 changed files with 269 additions and 16 deletions

View File

@@ -338,6 +338,7 @@ for svc in (
"openlit",
"phoenix",
"openhands",
"homepage",
):
files.directory(
name=f"compose/{svc} dir",
@@ -441,6 +442,34 @@ files.directory(
_sudo=True,
)
# Homepage config. The compose loop above only copies homepage.yml; the
# YAML config files live in compose/homepage/ on the source side and at
# /srv/docker/homepage/config/ on the box. Source-of-truth is the repo —
# `./run.sh` syncs the config files. Edits should happen here in the
# repo, not on the box, since pyinfra will overwrite drift.
files.directory(
name="Homepage config dir",
path=f"{COMPOSE_DIR}/homepage/config",
group="docker",
mode="2775",
_sudo=True,
)
for cfg in (
"services.yaml",
"settings.yaml",
"widgets.yaml",
"docker.yaml",
"bookmarks.yaml",
):
files.put(
name=f"homepage config: {cfg}",
src=f"compose/homepage/{cfg}",
dest=f"{COMPOSE_DIR}/homepage/config/{cfg}",
group="docker",
mode="664",
_sudo=True,
)
# --- Cleanup of artifacts from the prior native-build deploy ----------------
# All idempotent — `present=False` is a no-op when the target is absent.