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:
+1
-1
@@ -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();
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user