Files
mindnet/deploy/compose.dev.yml
T
LarsandClaude Opus 5.5 8f9f83aa79 Add reachability checks and develop/main container pipeline (inactive)
- preflight --live: Ollama/Qdrant reachable from the container, required
  Ollama models present, 768 dimensions; clear abort instead of traceback.
  Static check rejects unset or container-local service URLs.
- deploy/smoke.py: non-writing post-start check via published ports.
- deploy/deploy.sh: test (no network), build, preflight, up --wait, smoke;
  prod rolls back to the last good image tag.
- Workflow templates deploy-dev.yml (push develop) and deploy-prod.yml
  (push main) following the Kansho pattern; not under .gitea/workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:01:37 +01:00

115 lines
3.2 KiB
YAML

# Mindnet ENTWICKLUNG als Container: isoliert von Produktion.
#
# 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.
name: mindnet-dev
x-hardening: &hardening
image: mindnet:${MINDNET_IMAGE_TAG:-dev}
build:
context: ..
dockerfile: deploy/Dockerfile
target: runtime
env_file: ["${MINDNET_ENV_FILE:-env/dev.env}"]
read_only: true
tmpfs: ["/tmp:size=64m,mode=1777"]
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
init: true
pids_limit: 256
restart: unless-stopped
extra_hosts: ["host.docker.internal:host-gateway"]
logging:
driver: json-file
options: {max-size: "10m", max-file: "3"}
networks: [mindnet-dev]
x-fixed-env: &fixed-env
MINDNET_ENV: dev
COLLECTION_PREFIX: mindnet_dev
QDRANT_URL: http://qdrant:6333
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
volumes:
- type: bind
source: ${MINDNET_VAULT_HOST_PATH:?MINDNET_VAULT_HOST_PATH auf ein Testdaten-Verzeichnis setzen}
target: /vault
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"]
mem_limit: ${MINDNET_API_MEM_LIMIT:-2g}
depends_on:
qdrant: {condition: service_healthy}
healthcheck:
test: ["CMD", "python", "/opt/mindnet/healthcheck.py", "api"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
ui:
<<: *hardening
command: ["ui"]
environment:
<<: *fixed-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"]
mem_limit: ${MINDNET_UI_MEM_LIMIT:-1g}
depends_on:
api: {condition: service_healthy}
healthcheck:
test: ["CMD", "python", "/opt/mindnet/healthcheck.py", "ui"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
qdrant:
logs:
data:
networks:
mindnet-dev:
driver: bridge