From 9d987f639ab98777c2fcbb84426b54c451577c00 Mon Sep 17 00:00:00 2001 From: User Date: Sun, 12 Jul 2026 18:25:38 +0200 Subject: [PATCH] fix(backend): configPath from THT_CONFIG env (routes senza workspace fallivano in container) app.ts hardcodava configPath='config/tht.yaml' (symlink solo in dev). Nel container i route che non passano workspace esplicito (sessionList/sessionShow/documents) cercavano config/tht.yaml inesistente -> 500. Ora legge THT_CONFIG (entrypoint lo setta a workspaces/local.yaml), fallback al default per dev. Compose lo esplicita. Verificato: GET /sessions ora ritorna la lista. --- backend/src/app.ts | 2 +- compose.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/app.ts b/backend/src/app.ts index b40c915c..33fe00fe 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -33,7 +33,7 @@ export function buildApp(config: AppConfig, deps?: BuildAppDeps): FastifyInstanc const tht = deps?.thtRunner ?? new ThtRunner({ thtBin: config.thtBin, harnessDir: config.harnessDir, - configPath: "config/tht.yaml", + configPath: process.env.THT_CONFIG ?? "config/tht.yaml", }); const mgr = deps?.mgr ?? new PiProcessManager(config, deps?.spawnFn ? { spawnFn: deps.spawnFn } : undefined); const hub = new SseHub(); diff --git a/compose.yaml b/compose.yaml index 7fb68c4d..ad233ccd 100644 --- a/compose.yaml +++ b/compose.yaml @@ -21,9 +21,9 @@ services: PORT: "8787" THT_HARNESS_DIR: /app/harness THT_BIN: /opt/venv/bin/tht - PI_BIN: pi - AUTH_MODE: ${AUTH_MODE:-none} SETTINGS_FILE: /data/settings/settings.json + THT_CONFIG: /app/harness/workspaces/local.yaml # configPath di default per i route tht senza workspace esplicito + AUTH_MODE: ${AUTH_MODE:-none} MAX_PI_PROCESSES: ${MAX_PI_PROCESSES:-4} extra_hosts: - "host.docker.internal:host-gateway" # Supabase :5438 + Ollama :11434 sull'host