From 6578578acbc0c12aac163a81a09ec09ab6a41e6c Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 17 Oct 2026 18:31:48 +0200 Subject: [PATCH] fix: delegate run-stack.sh to the supported tht start path The direct Compose path did not render model projections or PSD secrets, so embedding-model-init failed on every run. run-stack.sh now execs scripts/thothii-local.sh start, which uses tht start. Co-Authored-By: Claude Haiku 5.5 --- scripts/run-stack.sh | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/scripts/run-stack.sh b/scripts/run-stack.sh index 6310d0ec..746dbe3e 100755 --- a/scripts/run-stack.sh +++ b/scripts/run-stack.sh @@ -1,36 +1,11 @@ #!/usr/bin/env bash -# run-stack.sh — avvia lo stack Compose locale di ThothII in primo piano. +# run-stack.sh — avvia lo stack locale di ThothII (installazione PSD) tramite tht. # -# Il core include Pi; DWH e LLM restano endpoint esterni configurati in deploy/env/local.env. -# Qdrant e Ollama embedding sono servizi Compose privati. Non richiede un eseguibile Pi sull'host. -# -# Preparazione: cp deploy/env/local.env.example deploy/env/local.env e compilare i valori. -# Uso: ./scripts/run-stack.sh [argomenti aggiuntivi per docker compose up] +# Il percorso Compose diretto non genera le proiezioni dei modelli né i secret dell'installazione, +# quindi non può avviare lo stack. Questo script delega al percorso supportato: scripts/thothii-local.sh. +# Uso: ./scripts/run-stack.sh [--build] set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" -LOCAL_ENV_FILE="${THT_LOCAL_ENV_FILE:-$ROOT/deploy/env/local.env}" -[[ -f "$LOCAL_ENV_FILE" ]] || { - echo "ERRORE: $LOCAL_ENV_FILE mancante. Copia deploy/env/local.env.example e configura gli endpoint." >&2 - exit 1 -} - -compose_files=(-f "$ROOT/compose.yaml" -f "$ROOT/deploy/compose.local.yaml") -if [[ "${THOTH_ENABLE_EMBEDDING_GPU:-0}" == "1" ]]; then - compose_files+=(-f "$ROOT/deploy/compose.embedding-gpu.yaml") -fi -if [[ "${THOTH_ENABLE_SENSITIVITY_NER:-0}" == "1" ]]; then - compose_files+=(-f "$ROOT/deploy/compose.sensitivity-ner.yaml") -fi - -compose=(docker compose --env-file "$LOCAL_ENV_FILE" "${compose_files[@]}") - -# Migrations are an explicit one-shot operation, never hidden in backend startup. The local -# launcher runs that operation before bringing the foreground stack up so a fresh checkout is -# immediately usable while production operators can invoke the same service during rollout. -"${compose[@]}" build core -"${compose[@]}" up -d catalog-db -"${compose[@]}" run --rm catalog-migrate - -exec "${compose[@]}" up --build "$@" +exec "$ROOT/scripts/thothii-local.sh" start "$@"