Files
matrix-ai-agent/docker-compose.yml
Christian Gick 8b7cf46312
Some checks failed
Build & Deploy / test (push) Successful in 9s
Tests / test (push) Successful in 9s
Build & Deploy / build-and-deploy (push) Failing after 5s
fix(article-summary): only engage FSM when user explicitly asks for summary/audio
Previously any chat message containing an article URL triggered the
Blinkist FSM: Firecrawl extraction + LLM topic detection + 3-option
menu. Pasting a link as conversational context spammed the menu.

Now _check_for_url additionally requires an intent keyword (summary,
zusammenfassung, audio, mp3, blinkist, tldr, lies das, fasse zusammen,
discuss/diskutieren, etc.) before engaging. Without intent the URL
falls through to the normal AI handler.

Also bind-mount article_summary/ so future fixes survive container
recreate (matches the pattern used for bot.py/voice.py/agent.py).
2026-04-18 06:30:42 +00:00

89 lines
2.6 KiB
YAML

services:
agent:
build:
context: .
dockerfile: Dockerfile
command: python agent.py start
env_file: .env
restart: unless-stopped
network_mode: host
bot:
build:
context: .
dockerfile: Dockerfile
command: python bot.py
env_file: .env
restart: unless-stopped
environment:
- LITELLM_BASE_URL
- LITELLM_API_KEY
- DEFAULT_MODEL
- BASE_MODEL=${BASE_MODEL:-claude-haiku}
- ESCALATION_MODEL=${ESCALATION_MODEL:-claude-sonnet}
- MEMORY_SERVICE_URL=http://memory-service:8090
- MEMORY_SERVICE_TOKEN
- PORTAL_URL
- BOT_API_KEY
ports:
- "9100:9100"
volumes:
- bot-data:/data
# Mount source files so git pull + restart works without rebuild
- ./bot.py:/app/bot.py:ro
- ./voice.py:/app/voice.py:ro
- ./agent.py:/app/agent.py:ro
- ./e2ee_patch.py:/app/e2ee_patch.py:ro
- ./cross_signing.py:/app/cross_signing.py:ro
- ./device_trust.py:/app/device_trust.py:ro
- ./article_summary:/app/article_summary:ro
depends_on:
memory-service:
condition: service_healthy
memory-db:
image: pgvector/pgvector:pg17
restart: unless-stopped
environment:
POSTGRES_USER: memory
POSTGRES_PASSWORD: ${MEMORY_DB_PASSWORD:-memory}
POSTGRES_DB: memories
volumes:
- memory-pgdata:/var/lib/postgresql/data
- ./memory-db-ssl/server.crt:/var/lib/postgresql/server.crt:ro
- ./memory-db-ssl/server.key:/var/lib/postgresql/server.key:ro
command: >
postgres
-c ssl=on
-c ssl_cert_file=/var/lib/postgresql/server.crt
-c ssl_key_file=/var/lib/postgresql/server.key
healthcheck:
test: ["CMD-SHELL", "pg_isready -U memory -d memories"]
interval: 5s
timeout: 3s
retries: 5
memory-service:
build: ./memory-service
restart: unless-stopped
environment:
DATABASE_URL: postgresql://memory_app:${MEMORY_APP_PASSWORD}@memory-db:5432/memories?sslmode=require
MEMORY_ENCRYPTION_KEY: ${MEMORY_ENCRYPTION_KEY}
MEMORY_DB_OWNER_PASSWORD: ${MEMORY_DB_PASSWORD:-memory}
LITELLM_BASE_URL: ${LITELLM_BASE_URL}
LITELLM_API_KEY: ${LITELLM_MASTER_KEY}
EMBED_MODEL: ${EMBED_MODEL:-text-embedding-3-small}
MEMORY_SERVICE_TOKEN: ${MEMORY_SERVICE_TOKEN:-}
depends_on:
memory-db:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8090/health')"]
interval: 10s
timeout: 5s
retries: 3
volumes:
bot-data:
memory-pgdata: