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.
This commit is contained in:
User
2026-07-12 18:25:38 +02:00
parent 4d80ed0b83
commit 9d987f639a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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();