docs(state)+test(l2): deploy state snapshot + configurable L2 workspace path

PROJECT_STATE: sezione deploy Docker live (Profile A embedded portale, ruoli DB,
secrets, merge codex, fix load-bearing). L2 test: WORKSPACE da env THT_L2_WORKSPACE
(default path Mac) -> può girare ovunque, skip pulito se assente.
This commit is contained in:
User
2026-07-12 23:11:20 +02:00
parent 122cbfd50d
commit eb83cb8fc1
2 changed files with 16 additions and 2 deletions
+14 -1
View File
@@ -1,8 +1,21 @@
# ThothII — Project State
> Starting-point snapshot for new sessions. Last updated: 2026-07-08 (three efficiency levers deployed).
> Starting-point snapshot for new sessions. Last updated: 2026-07-12 (Docker deploy live + codex portable-deployment merged).
> Point a fresh session here ("read PROJECT_STATE.md") before substantial work.
## Deployment — Docker locale (Profile A, co-located) — LIVE 2026-07-12
ThothII gira in Docker sul server co-locato, **embedded nel portale omics_portal** a `https://aritmolab.policlinicosandonato.it/datamart-builder` (backend invisibile, tutto same-origin via nginx del portale).
- **2 container** su `compose.yaml`: `thothii-core` (Fastify + harness tht + Pi) + `thothii-frontend` (Vite + nginx-unprivileged). Rete `omics_portal_omics_network` (external) con alias `thothii-core`/`thothii-frontend`.
- **DB**: Postgres diretto `:5438` (stessa istanza: schema `datawarehouse` 163 tabelle + `vectors` pgvector). Ruoli dedicati `thoth_dwh_reader` (read-only) + `thoth_vector_rw` (read+write). Embeddings: Ollama `:11434`.
- **Secrets**: `deploy/thothii.env` (env_file, gitignored) + `THT_MODEL_API_KEY_FILE` (key modello, file 0600 — meccanismo provider-credentials di Codex) + bind-mount `~/.pi` (pi-config).
- **Backend**: merge di `codex/portable-deployment` (secret-bundle, provider-credentials, auth `upstream`, security hardening, CI multiarch). Setup Docker MIO tenuto (il modello Docker-secrets di Codex è in `deploy/` come alternativa inerte).
- **Portale** (repo `omics_portal`, branch `agent/patient-capabilities-datamart-ui`): `nginx.conf` rotte `/datamart-builder/api`+`/assets` + `auth_request`, template `datamart_builder.html` (mount `<div id="root">` + tag `{% vite_assets %}`), vista `datamart_builder_api_auth`. Auth: `authentik Admins` bypass; utenti normali necessitano gruppo `omics-datamart-builder`.
- **Fix load-bearing**: `configPath` da `THT_CONFIG` (route senza workspace), `vite_assets` `mark_safe` (SPA bianca), `COPY harness/`+`cp workflow.yaml`+`pip install .` (pip 26 / tht module-relative), entrypoint `server` case.
- **Standalone/dev**: `docker-compose.dev.yml` (rete propria, porte host 8787/8090) + `scripts/docker-smoke.sh`.
- Piano dettagliato: `docs/superpowers/plans/2026-07-12-local-docker-deploy-implementation.md`.
## What ThothII is
A **human-in-the-loop datamart builder**: it turns a natural-language question into