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

@@ -0,0 +1,57 @@
# VORLAGE – NICHT AKTIV. Liegt absichtlich außerhalb von .gitea/workflows/.
# Aktivierung (Kopie nach .gitea/workflows/deploy-dev.yml) erst nach Freigabe,
# da der Runner `linux_host` auf llm-node (= Produktionsserver) läuft.
#
# Muster wie Kansho, aber nur manuell auslösbar (workflow_dispatch), kein Push-Trigger.
# Ein PROD-Workflow für Container existiert bewusst noch nicht; der bestehende
# .gitea/workflows/deploy.yml (systemd, Push auf main) bleibt unverändert.
name: Deploy mindnet DEV (Container)
on:
workflow_dispatch:
concurrency:
group: deploy-mindnet-dev
cancel-in-progress: false
jobs:
deploy:
runs-on: linux_host
env:
TARGET: /home/llmadmin/docker/mindnet-dev
COMPOSE: docker compose -f deploy/compose.dev.yml --env-file deploy/env/dev.env
steps:
- name: Checkout develop
run: |
set -euo pipefail
REPO="http://192.168.2.144:3000/Lars/mindnet.git"
mkdir -p "$TARGET" && cd "$TARGET"
if [ ! -d .git ]; then
git clone -b develop "$REPO" .
else
git fetch origin develop
git checkout develop
git reset --hard origin/develop
fi
test -f deploy/env/dev.env || { echo "deploy/env/dev.env fehlt auf dem Host"; exit 1; }
- name: Build (Tag = Commit)
run: |
set -euo pipefail
cd "$TARGET"
export MINDNET_IMAGE_TAG="dev-$(git rev-parse --short HEAD)"
$COMPOSE build --pull
$COMPOSE run --rm --no-deps api preflight
- name: Start und Health
run: |
set -euo pipefail
cd "$TARGET"
export MINDNET_IMAGE_TAG="dev-$(git rev-parse --short HEAD)"
if ! $COMPOSE up -d --wait; then
$COMPOSE logs api --tail 150 || true
$COMPOSE ps || true
exit 1
fi
curl -sf "http://127.0.0.1:${MINDNET_API_PORT:-8012}/healthz"