Files
MindSift/docker-compose.yml
T
sandrodachandClaude Opus 5.5 7801cd13b9
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m49s
feat(voice): self-hosted speech recognition via Whisper (STT_*)
- STT_URL switches voice input to an OpenAI-compatible Whisper server
  (e.g. speaches); without it the browser's recognition stays. Configured
  by environment only, with limits for upload size, parallel jobs, hourly
  budget per user and timeout. The demo always uses the browser.
- POST /voice/transcribe forwards recordings and returns the text; nothing
  is stored. On startup MindSift waits for the server and asks it to
  download the model if missing.
- Admin card shows the active mode and server state, with a test recording.
- docker-compose: optional "whisper" service (speaches 0.8.3 CPU, profile
  "whisper", models in ./whisper).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 22:12:57 +01:00

69 lines
3.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
mindsift:
image: git.dsit.me/sandrodach/mindsift:dev
container_name: mindsift
restart: unless-stopped
ports:
- "${PORT:-8080}:8080"
volumes:
- ./data:/data
environment:
- PORT=8080
- DATA_DIR=/data
- JWT_SECRET=${JWT_SECRET:-change_this_to_a_secure_random_key_min_32_chars}
- BASE_URL=${BASE_URL:-http://localhost:8080}
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-false}
- LOG_LEVEL=${LOG_LEVEL:-info}
# Set LOG_LEVEL=debug or DEBUG=true for detailed request and sync logging
# - LOG_LEVEL=debug
# - DEBUG=true
# Demo mode: if true, automatically seeds demo accounts admin/admin and user/user
- MINDA_DEMO=${MINDA_DEMO:-false}
# Optional SMTP / Mail Configuration (can also be configured in Admin UI)
- SMTP_HOST=${SMTP_HOST:-}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER:-}
- SMTP_PASS=${SMTP_PASS:-}
- SMTP_FROM=${SMTP_FROM:-}
- SMTP_TLS=${SMTP_TLS:-true}
- SMTP_SKIP_VERIFY=${SMTP_SKIP_VERIFY:-false}
# Optional: Impressum / Datenschutz (URL oder Markdown-Datei, z. B. per Volume eingebunden)
- LEGAL_IMPRINT_URL=${LEGAL_IMPRINT_URL:-}
- LEGAL_PRIVACY_URL=${LEGAL_PRIVACY_URL:-}
- LEGAL_IMPRINT_CONTENT_FILE=${LEGAL_IMPRINT_CONTENT_FILE:-}
- LEGAL_PRIVACY_CONTENT_FILE=${LEGAL_PRIVACY_CONTENT_FILE:-}
# Optional: eigene Spracherkennung (Whisper, siehe Dienst "whisper" unten). Ohne STT_URL nutzt
# MindSift die Spracherkennung des Browsers. Alles nur hier einstellbar, nicht in der Oberfläche;
# Probleme stehen im Log (docker compose logs mindsift whisper).
- STT_URL=${STT_URL:-} # z. B. http://whisper:8000 – gesetzt = Server-Modus
- STT_MODEL=${STT_MODEL:-deepdml/faster-whisper-large-v3-turbo-ct2} # kleiner/schneller: Systran/faster-whisper-small
- STT_LANGUAGE=${STT_LANGUAGE:-de} # Sprachcode, "auto" = automatisch erkennen
- STT_API_KEY=${STT_API_KEY:-} # nur falls der Whisper-Server einen verlangt (API_KEY dort)
- STT_DISABLED=${STT_DISABLED:-false} # true = Mikrofon überall ausblenden
# Schutzwerte für den Server-Modus
- STT_MAX_SECONDS=${STT_MAX_SECONDS:-600} # längste Aufnahme in Sekunden (danach stoppt der Browser)
- STT_MAX_UPLOAD_MB=${STT_MAX_UPLOAD_MB:-25} # größte Aufnahme in MB
- STT_MAX_PARALLEL=${STT_MAX_PARALLEL:-1} # gleichzeitige Erkennungen, weitere warten in der Schlange
- STT_PER_USER_PER_HOUR=${STT_PER_USER_PER_HOUR:-60} # Erkennungen pro Benutzer und Stunde
- STT_TIMEOUT_SECONDS=${STT_TIMEOUT_SECONDS:-120} # Höchstdauer pro Erkennung inkl. Warten
# Optionale Spracherkennung auf dem eigenen Server (speaches mit faster-whisper, nur CPU).
# Start: in .env STT_URL=http://whisper:8000 und COMPOSE_PROFILES=whisper setzen, dann
# mkdir -p whisper && sudo chown 1000:1000 whisper (der Container läuft als UID 1000)
# docker compose up -d
# Das Modell (large-v3-turbo ca. 1,6 GB) lädt MindSift beim ersten Start automatisch in ./whisper.
# RAM: large-v3-turbo ca. 2 GB, small ca. 1 GB.
whisper:
image: ghcr.io/speaches-ai/speaches:0.8.3-cpu
container_name: mindsift-whisper
restart: unless-stopped
profiles: ["whisper"]
volumes:
- ./whisper:/home/ubuntu/.cache/huggingface/hub
environment:
- WHISPER__COMPUTE_TYPE=int8 # schneller und sparsamer auf der CPU, kaum Qualitätsverlust
- STT_MODEL_TTL=-1 # Modell im Speicher halten (sonst nach 5 Min. entladen, nächste Erkennung lädt neu)
- ENABLE_UI=false # keine Weboberfläche von speaches
- LOG_LEVEL=info
# Kein Port nach außen: nur MindSift spricht im Docker-Netz mit dem Dienst.