Run the containers with the systemd configuration, 1:1
The containers now read the unchanged .env of the matching systemd instance (/home/llmadmin/mindnet_dev/.env, /home/llmadmin/mindnet/.env) and use the same Qdrant, Ollama, vault and collection prefix, so both can be compared side by side. Only container-specific values are overridden: host service addresses (host.docker.internal instead of 127.0.0.1) and the read-only vault. - deploy/appenv.py derives the vault mount and prefix from that .env and rejects application keys in the container-only file. - Remove the separate dev Qdrant, the synthetic test vault and the import step. - UI binds 0.0.0.0 like systemd; API stays loopback by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eae30775e3
commit
6cdad8b046
20 files changed
+373
-415
No files matched your search
+23
-39
@@ -1,11 +1,11 @@
|
||||
# Mindnet ENTWICKLUNG als Container: isoliert von Produktion.
|
||||
# Mindnet ENTWICKLUNG als Container: dieselbe Anwendung mit derselben Konfiguration
|
||||
# wie die systemd-Dev-Instanz (8002/8502), parallel auf 8012/8512 zum Vergleich.
|
||||
#
|
||||
# docker compose -f deploy/compose.dev.yml --env-file deploy/env/dev.env up -d --wait
|
||||
#
|
||||
# - Eigene Qdrant-Instanz mit eigenem Volume (Prod-Qdrant wird nie angesprochen).
|
||||
# - Vault: nur Testdaten, nur lesend.
|
||||
# - Ollama ist ein gemeinsamer Host-Dienst (Embeddings).
|
||||
# - Andere Ports und anderer Compose-Projektname als Prod.
|
||||
# Gestartet über deploy/deploy.sh dev. Zwei Dateien, beide nur auf dem Host:
|
||||
# - MINDNET_APP_ENV_FILE: die unveränderte .env der systemd-Dev-Instanz
|
||||
# - MINDNET_ENV_FILE: nur Container-Angaben (Ports, Bind-Adressen, Freigaben)
|
||||
# Fest überschrieben wird nur, was im Container anders lauten muss: die Adressen
|
||||
# der Host-Dienste (statt 127.0.0.1). Vault-Pfad und Präfix kommen aus der .env.
|
||||
|
||||
name: mindnet-dev
|
||||
|
||||
@@ -15,7 +15,9 @@ x-hardening: &hardening
|
||||
context: ..
|
||||
dockerfile: deploy/Dockerfile
|
||||
target: runtime
|
||||
env_file: ["${MINDNET_ENV_FILE:-env/dev.env}"]
|
||||
env_file:
|
||||
- ${MINDNET_APP_ENV_FILE:?MINDNET_APP_ENV_FILE auf die .env der systemd-Dev-Instanz setzen}
|
||||
- ${MINDNET_ENV_FILE:-env/dev.env}
|
||||
read_only: true
|
||||
tmpfs: ["/tmp:size=64m,mode=1777"]
|
||||
cap_drop: [ALL]
|
||||
@@ -29,54 +31,36 @@ x-hardening: &hardening
|
||||
options: {max-size: "10m", max-file: "3"}
|
||||
networks: [mindnet-dev]
|
||||
|
||||
x-fixed-env: &fixed-env
|
||||
# Container-bedingte Werte; haben Vorrang vor beiden env-Dateien.
|
||||
x-container-env: &container-env
|
||||
MINDNET_ENV: dev
|
||||
COLLECTION_PREFIX: mindnet_dev
|
||||
QDRANT_URL: http://qdrant:6333
|
||||
QDRANT_URL: http://host.docker.internal:6333
|
||||
MINDNET_OLLAMA_URL: http://host.docker.internal:11434
|
||||
VECTOR_DIM: "768"
|
||||
MINDNET_EXPECTED_VECTOR_DIM: "768"
|
||||
MINDNET_EXPECTED_EMBEDDING_MODEL: nomic-embed-text
|
||||
MINDNET_VAULT_ROOT: /vault
|
||||
MINDNET_VAULT_READONLY: "true"
|
||||
MINDNET_VOCAB_PATH: /vault/_system/dictionary/edge_vocabulary.md
|
||||
MINDNET_SCHEMA_PATH: /vault/_system/dictionary/graph_schema.md
|
||||
|
||||
services:
|
||||
qdrant:
|
||||
image: qdrant/qdrant:v1.16.2@sha256:dab6de32f7b2cc599985a7c764db3e8b062f70508fb85ca074aa856f829bf335
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
QDRANT__TELEMETRY_DISABLED: "true"
|
||||
volumes:
|
||||
- qdrant:/qdrant/storage
|
||||
# Standardmäßig nicht veröffentlicht; zum Debuggen optional lokal am Host.
|
||||
ports: ["127.0.0.1:${MINDNET_DEV_QDRANT_PORT:-6343}:6333"]
|
||||
healthcheck:
|
||||
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/6333"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
networks: [mindnet-dev]
|
||||
|
||||
api:
|
||||
<<: *hardening
|
||||
command: ["api"]
|
||||
environment:
|
||||
<<: *fixed-env
|
||||
<<: *container-env
|
||||
volumes:
|
||||
# Derselbe Vault wie systemd-Dev, eingehängt dort, wo MINDNET_VAULT_ROOT hinzeigt.
|
||||
# Nur lesend, solange beide Instanzen parallel laufen.
|
||||
- type: bind
|
||||
source: ${MINDNET_VAULT_HOST_PATH:?MINDNET_VAULT_HOST_PATH auf ein Testdaten-Verzeichnis setzen}
|
||||
target: /vault
|
||||
source: ${MINDNET_VAULT_HOST_PATH:?wird von deploy/deploy.sh aus der .env abgeleitet}
|
||||
target: ${MINDNET_VAULT_TARGET:?wird von deploy/deploy.sh aus der .env abgeleitet}
|
||||
read_only: true
|
||||
bind:
|
||||
create_host_path: false
|
||||
propagation: rslave
|
||||
- logs:/app/logs
|
||||
- data:/app/data
|
||||
ports: ["127.0.0.1:${MINDNET_API_PORT:-8012}:8000"]
|
||||
ports: ["${MINDNET_API_BIND:-127.0.0.1}:${MINDNET_API_PORT:-8012}:8000"]
|
||||
mem_limit: ${MINDNET_API_MEM_LIMIT:-2g}
|
||||
depends_on:
|
||||
qdrant: {condition: service_healthy}
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "/opt/mindnet/healthcheck.py", "api"]
|
||||
interval: 30s
|
||||
@@ -88,12 +72,13 @@ services:
|
||||
<<: *hardening
|
||||
command: ["ui"]
|
||||
environment:
|
||||
<<: *fixed-env
|
||||
<<: *container-env
|
||||
MINDNET_VAULT_REQUIRED: "false"
|
||||
MINDNET_API_URL: http://api:8000
|
||||
volumes:
|
||||
- data:/app/data:ro
|
||||
ports: ["${MINDNET_UI_BIND:-127.0.0.1}:${MINDNET_UI_PORT:-8512}:8501"]
|
||||
# Wie systemd (STREAMLIT_SERVER_ADDRESS=0.0.0.0): im LAN erreichbar.
|
||||
ports: ["${MINDNET_UI_BIND:-0.0.0.0}:${MINDNET_UI_PORT:-8512}:8501"]
|
||||
mem_limit: ${MINDNET_UI_MEM_LIMIT:-1g}
|
||||
depends_on:
|
||||
api: {condition: service_healthy}
|
||||
@@ -105,7 +90,6 @@ services:
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
qdrant:
|
||||
logs:
|
||||
data:
|
||||
|
||||
|
||||
Reference in new issue
Block a user