feat(deploy): docker images, compose, roles SQL, local workspace
- core.Dockerfile: python:3.12-slim + node 22 copied (same bookworm glibc), non-root, tht+pi
- frontend.Dockerfile: vite build (env-driven base/assetsDir) + nginx-unprivileged
- compose.yaml (embedded, omics_network ext, zero host ports) + docker-compose.dev.yml (standalone)
- deploy/sql: thoth_dwh_reader (ro) + thoth_vector_rw (rw) roles
- deploy/thothii.env.example + harness/workspaces/local.yaml (direct DWH+vector, 5438)
- scripts/docker-smoke.sh; .dockerignore; gitignore deploy secrets
- verified: both images build, core health {ok}, config check validates local.yaml
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
-- ThothII — ruolo vector read+write (schema vectors).
|
||||
-- Stessa istanza del DWH (porta 5438). ThothII indicizza (write) + ricerca (read) direttamente.
|
||||
-- La separazione reader/writer resta rilevante solo per il path REST (non usato in Profile A).
|
||||
-- psql -h localhost -p 5438 -U postgres -d postgres -v PWD='<secret>' -f 20-vector-roles.sql
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'thoth_vector_rw') THEN
|
||||
CREATE ROLE thoth_vector_rw LOGIN PASSWORD :'PWD';
|
||||
END IF;
|
||||
END $$;
|
||||
|
||||
CREATE SCHEMA IF NOT EXISTS vectors;
|
||||
|
||||
-- L'estensione pgvector deve esistere (già presente nell'istanza di produzione).
|
||||
-- CREATE EXTENSION IF NOT EXISTS vector;
|
||||
|
||||
GRANT USAGE, CREATE ON SCHEMA vectors TO thoth_vector_rw;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA vectors TO thoth_vector_rw;
|
||||
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA vectors TO thoth_vector_rw;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA vectors
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO thoth_vector_rw;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA vectors
|
||||
GRANT USAGE, SELECT ON SEQUENCES TO thoth_vector_rw;
|
||||
Reference in New Issue
Block a user