skaldsong: fix first-deploy footguns (SPA path + cors_origins shape)

Two corrections surfaced by the first end-to-end deploy that didn't
land in the pre-flight align:

- SPA static assets are at /app/spa, not /app/web/dist (Dockerfile
  COPYs the SvelteKit build output flat into /app/spa, not into
  /app/spa/dist). Mismatch caused /health to 500 with
  "RuntimeError: File at path /app/web/dist/index.html does not
  exist."

- SKALDSONG_HOST_CORS_ORIGINS must be a JSON array literal in .env.
  Pydantic-settings parses complex-typed env vars via json.loads();
  bare URL string fails first-boot with SettingsError.

Container now reports Up (healthy) on ana-docker; /health 200.
This commit is contained in:
vh
2026-05-18 23:35:13 -07:00
parent 8a4276d6b5
commit 4b8dc9f7e1
2 changed files with 10 additions and 6 deletions
+6 -3
View File
@@ -51,9 +51,12 @@ WORLDTREE_BASE_URL=http://10.250.50.152:8080
# prior nh3-dev hand-launch.
SKALDSONG_HOST_WIZARD_AGENT_ID=skaldsong:wizard-v2
# CORS — comma-separated origins. Include the SPA's public hostname AND
# any dev origins still in rotation.
SKALDSONG_HOST_CORS_ORIGINS=http://10.250.50.70:8300
# CORS — JSON array of origins. Pydantic-settings parses complex-typed
# env vars via json.loads(), so the value MUST be a JSON array literal
# (a bare URL string fails first-boot with `SettingsError: error
# parsing value for field "cors_origins"`). Include the SPA's public
# hostname AND any dev origins still in rotation.
SKALDSONG_HOST_CORS_ORIGINS=["http://10.250.50.70:8300"]
# TTS — Kokoro on irv-ml1, reached over WireGuard via ana-wg. Same URL
# works fleet-wide; the WG tunnel handles the cross-site routing.
+4 -3
View File
@@ -73,9 +73,10 @@ services:
SKALDSONG_TTS_ENGINE: "${SKALDSONG_TTS_ENGINE:-kokoro}"
SKALDSONG_TTS_BASE_URL: "${SKALDSONG_TTS_BASE_URL:-http://10.100.79.3:8193}"
# SPA static assets — baked into the image at /app/web/dist by the
# Dockerfile's web-builder stage.
SKALDSONG_HOST_STATIC_ASSETS_PATH: /app/web/dist
# SPA static assets — baked into the image at /app/spa by the
# Dockerfile's web-builder stage (COPYs the SvelteKit build output
# flat into /app/spa, not into /app/spa/dist).
SKALDSONG_HOST_STATIC_ASSETS_PATH: /app/spa
# Persistent state paths inside the container. The db/ parent
# dir is the bind-mount target (not the file itself) so SQLite