Prepare containerized dev/prod deployment (inactive)

Add a Docker image and separate Compose projects for development and
production, based on the stable main behaviour without the privacy
gateway. Nothing is wired into the existing systemd deploy workflow.

- One non-root image (api | ui | preflight), base image pinned by
  digest, dependencies from a hash-locked universal lock without torch
  and sentence-transformers (MiniLM is not on the runtime path)
- Preflight aborts on: VECTOR_DIM != 768 or non-nomic embedding
  profile, implicit or cross-env collection prefix, cloud keys without
  explicit egress acknowledgement, missing/empty or writable vault mount
- Vault is a read-only NAS bind mount without host-path autocreation;
  healthcheck turns unhealthy when the vault sentinel disappears
- Dev runs its own Qdrant; prod reuses the existing host instance
- API published on loopback only; read-only rootfs, cap_drop ALL,
  no-new-privileges
- Dev workflow kept as an inactive template outside .gitea/workflows
- Docs: operations guide and migration plan with release gates, test
  baseline classification, R2/R3 and privacy gateway requirements

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-28 14:33:18 +01:00
1 parent 0d61a9e191
commit 7a225ba2b6
18 files changed
+2864

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
# Mindnet PROD (Container) – Vorlage. Kopieren nach deploy/env/prod.env (nie committen).
# Dient zugleich als --env-file für Compose (Interpolation) und als env_file des Containers.
# Fest verdrahtete Sicherheitswerte (MINDNET_ENV, VECTOR_DIM, Vault-Pfade, Read-only)
# stehen in compose.prod.yml und lassen sich hier NICHT überschreiben.
# --- Compose / Host ------------------------------------------------------------
MINDNET_IMAGE_TAG=
# Host-Pfad des NAS-Vaults (muss vor dem Start gemountet sein; wird nur lesend eingebunden)
MINDNET_VAULT_HOST_PATH=
MINDNET_API_PORT=8011
MINDNET_UI_PORT=8511
# UI nur lokal veröffentlichen; für LAN-Zugriff explizit die LAN-IP des Hosts setzen
MINDNET_UI_BIND=127.0.0.1
# --- Daten ---------------------------------------------------------------------
# Bestehende produktive Qdrant-Instanz auf dem Host (wird nicht verändert)
QDRANT_URL=http://host.docker.internal:6333
QDRANT_API_KEY=
COLLECTION_PREFIX=mindnet
# --- Lokale Modelle (gemeinsamer Host-Dienst) -------------------------------------
MINDNET_OLLAMA_URL=http://host.docker.internal:11434
MINDNET_EMBEDDING_MODEL=nomic-embed-text
MINDNET_LLM_MODEL=phi3:mini
MINDNET_LLM_TIMEOUT=300.0
MINDNET_LLM_BACKGROUND_LIMIT=2
# --- Cloud-LLM -------------------------------------------------------------------
# Ohne Privacy Gateway gehen Vault-Inhalte unmaskiert an den Provider.
# Daher in PROD leer lassen. Sind Keys gesetzt, startet der Container nur mit
# MINDNET_ALLOW_CLOUD_EGRESS=true – das ist in PROD derzeit NICHT freigegeben.
MINDNET_LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=
GOOGLE_API_KEY=
MINDNET_ALLOW_CLOUD_EGRESS=false
MINDNET_LLM_FALLBACK=true
MINDNET_LLM_RATE_LIMIT_WAIT=60.0
MINDNET_LLM_RATE_LIMIT_RETRIES=3
# --- Verarbeitung (aus config/prod.env übernommen) ---------------------------------
MINDNET_TYPES_FILE=./config/types.yaml
MINDNET_CHANGE_DETECTION_MODE=full
MINDNET_LLM_VALIDATION_HEADERS=Unzugeordnete Kanten,Edge Pool,Candidates
MINDNET_LLM_VALIDATION_HEADER_LEVEL=3
MINDNET_NOTE_SCOPE_ZONE_HEADERS=Smart Edges,Relationen,Global Links,Note-Level Relations,Globale Verbindungen
MINDNET_NOTE_SCOPE_HEADER_LEVEL=2
DEBUG=false