mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 19:46:41 +02:00
feat(matrix): add Stats Bot and Project Doc Bot services
Complete GDPR-compliant bot suite for Matrix: matrix-stats-bot (port 3312): - Analytics reports from Umami - Commands: !stats, !today, !week, !realtime, !users - Scheduled daily/weekly reports to Matrix room matrix-project-doc-bot (port 3313): - Project documentation with photos, voice, text - Voice transcription via OpenAI Whisper - Blog generation with 5 styles (casual, technical, tutorial, social, story) - Commands: !new, !projects, !switch, !status, !generate, !export - Uses PostgreSQL + S3 (MinIO) for storage Changes: - docker-compose.macmini.yml: Added both Matrix bots - health-check.sh: Added health checks for both bots Environment variables required: - MATRIX_STATS_BOT_TOKEN, MATRIX_PROJECT_DOC_BOT_TOKEN - OPENAI_API_KEY (for Project Doc Bot) https://claude.ai/code/session_01E3r5aFW3YLAhEJfsL2ryhv
This commit is contained in:
parent
aabe328b51
commit
7c5e9e3c49
46 changed files with 2215 additions and 0 deletions
|
|
@ -835,6 +835,82 @@ services:
|
|||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# ============================================
|
||||
# Matrix Stats Bot (GDPR-compliant Analytics)
|
||||
# ============================================
|
||||
|
||||
matrix-stats-bot:
|
||||
image: ghcr.io/memo-2023/matrix-stats-bot:latest
|
||||
container_name: manacore-matrix-stats-bot
|
||||
restart: always
|
||||
depends_on:
|
||||
synapse:
|
||||
condition: service_healthy
|
||||
umami:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3312
|
||||
TZ: Europe/Berlin
|
||||
MATRIX_HOMESERVER_URL: http://synapse:8008
|
||||
MATRIX_ACCESS_TOKEN: ${MATRIX_STATS_BOT_TOKEN}
|
||||
MATRIX_REPORT_ROOM_ID: ${MATRIX_STATS_REPORT_ROOM:-}
|
||||
UMAMI_API_URL: http://umami:3000
|
||||
UMAMI_USERNAME: ${UMAMI_USERNAME:-admin}
|
||||
UMAMI_PASSWORD: ${UMAMI_PASSWORD}
|
||||
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-manacore123}@postgres:5432/manacore_auth
|
||||
volumes:
|
||||
- matrix_stats_bot_data:/app/data
|
||||
ports:
|
||||
- "3312:3312"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3312/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# ============================================
|
||||
# Matrix Project Doc Bot (GDPR-compliant Documentation)
|
||||
# ============================================
|
||||
|
||||
matrix-project-doc-bot:
|
||||
image: ghcr.io/memo-2023/matrix-project-doc-bot:latest
|
||||
container_name: manacore-matrix-project-doc-bot
|
||||
restart: always
|
||||
depends_on:
|
||||
synapse:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3313
|
||||
TZ: Europe/Berlin
|
||||
MATRIX_HOMESERVER_URL: http://synapse:8008
|
||||
MATRIX_ACCESS_TOKEN: ${MATRIX_PROJECT_DOC_BOT_TOKEN}
|
||||
MATRIX_ALLOWED_USERS: ${MATRIX_PROJECT_DOC_ALLOWED_USERS:-}
|
||||
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-manacore123}@postgres:5432/project_doc_bot
|
||||
S3_ENDPOINT: http://minio:9000
|
||||
S3_REGION: us-east-1
|
||||
S3_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
|
||||
S3_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
|
||||
S3_BUCKET: project-doc-bot
|
||||
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
|
||||
OPENAI_MODEL: gpt-4o-mini
|
||||
volumes:
|
||||
- matrix_project_doc_bot_data:/app/data
|
||||
ports:
|
||||
- "3313:3313"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3313/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# ============================================
|
||||
# Auto-Update (Watchtower)
|
||||
# ============================================
|
||||
|
|
@ -877,3 +953,7 @@ volumes:
|
|||
name: manacore-synapse
|
||||
matrix_ollama_bot_data:
|
||||
name: manacore-matrix-ollama-bot
|
||||
matrix_stats_bot_data:
|
||||
name: manacore-matrix-stats-bot
|
||||
matrix_project_doc_bot_data:
|
||||
name: manacore-matrix-project-doc-bot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue