Files
discord-fishbowl/docker-compose.yml
root 10563900a3 Implement comprehensive LLM provider system with global cost protection
- Add multi-provider LLM architecture supporting OpenRouter, OpenAI, Gemini, and custom providers
- Implement global LLM on/off switch with default DISABLED state for cost protection
- Add per-character LLM configuration with provider-specific models and settings
- Create performance-optimized caching system for LLM enabled status checks
- Add API key validation before enabling LLM providers to prevent broken configurations
- Implement audit logging for all LLM enable/disable actions for cost accountability
- Create comprehensive admin UI with prominent cost warnings and confirmation dialogs
- Add visual indicators in character list for custom AI model configurations
- Build character-specific LLM client system with global fallback mechanism
- Add database schema support for per-character LLM settings
- Implement graceful fallback responses when LLM is globally disabled
- Create provider testing and validation system for reliable connections
2025-07-08 07:35:48 -07:00

185 lines
5.2 KiB
YAML

services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: discord_fishbowl
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD:-fishbowl_password}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "15432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
networks:
- fishbowl-network
redis:
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD:-redis_password}
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
- fishbowl-network
# ChromaDB for vector storage
chromadb:
image: chromadb/chroma:latest
ports:
- "8001:8000"
volumes:
- chroma_data:/chroma/chroma
environment:
- IS_PERSISTENT=TRUE
restart: unless-stopped
networks:
- fishbowl-network
profiles:
- chromadb
# Qdrant for vector storage (default vector database)
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
environment:
- QDRANT__SERVICE__HTTP_PORT=6333
- QDRANT__SERVICE__GRPC_PORT=6334
- QDRANT__SERVICE__HOST=0.0.0.0
restart: unless-stopped
networks:
- fishbowl-network
fishbowl:
build: .
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_started
environment:
# Database configuration
DATABASE_URL: postgresql+asyncpg://postgres:${DB_PASSWORD:-fishbowl_password}@postgres:5432/discord_fishbowl
DB_HOST: postgres
DB_PORT: 5432
DB_PASSWORD: ${DB_PASSWORD:-fishbowl_password}
DB_NAME: discord_fishbowl
DB_USER: postgres
# Redis configuration
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redis_password}
# Discord configuration
DISCORD_BOT_TOKEN: ${DISCORD_BOT_TOKEN}
DISCORD_GUILD_ID: "${DISCORD_GUILD_ID}"
DISCORD_CHANNEL_ID: "${DISCORD_CHANNEL_ID}"
# LLM configuration (external service, use host IP)
LLM_BASE_URL: ${LLM_BASE_URL:-http://192.168.1.200:5005/v1}
LLM_MODEL: ${LLM_MODEL:-koboldcpp/Broken-Tutu-24B-Transgression-v2.0.i1-Q4_K_M}
# Vector database configuration
VECTOR_DB_TYPE: ${VECTOR_DB_TYPE:-qdrant}
QDRANT_HOST: qdrant
QDRANT_PORT: 6333
# Application configuration
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ENVIRONMENT: production
# Conversation system settings
CONVERSATION_FREQUENCY: ${CONVERSATION_FREQUENCY:-0.5}
RESPONSE_DELAY_MIN: ${RESPONSE_DELAY_MIN:-1.0}
RESPONSE_DELAY_MAX: ${RESPONSE_DELAY_MAX:-5.0}
MEMORY_RETENTION_DAYS: ${MEMORY_RETENTION_DAYS:-90}
MAX_CONVERSATION_LENGTH: ${MAX_CONVERSATION_LENGTH:-50}
CREATIVITY_BOOST: ${CREATIVITY_BOOST:-true}
SAFETY_MONITORING: ${SAFETY_MONITORING:-false}
AUTO_MODERATION: ${AUTO_MODERATION:-false}
PERSONALITY_CHANGE_RATE: ${PERSONALITY_CHANGE_RATE:-0.1}
QUIET_HOURS_ENABLED: ${QUIET_HOURS_ENABLED:-false}
QUIET_HOURS_START: ${QUIET_HOURS_START:-23}
QUIET_HOURS_END: ${QUIET_HOURS_END:-7}
MIN_DELAY_SECONDS: ${MIN_DELAY_SECONDS:-30}
MAX_DELAY_SECONDS: ${MAX_DELAY_SECONDS:-300}
volumes:
- ./logs:/app/logs
- ./config:/app/config
- ./data:/app/data
restart: unless-stopped
networks:
- fishbowl-network
fishbowl-admin:
build:
context: .
dockerfile: Dockerfile.admin
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
environment:
# Database configuration
DATABASE_URL: postgresql+asyncpg://postgres:${DB_PASSWORD:-fishbowl_password}@postgres:5432/discord_fishbowl
DB_HOST: postgres
DB_PORT: 5432
DB_PASSWORD: ${DB_PASSWORD:-fishbowl_password}
# Redis configuration
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ${REDIS_PASSWORD:-redis_password}
# Discord configuration
DISCORD_BOT_TOKEN: ${DISCORD_BOT_TOKEN}
DISCORD_GUILD_ID: "${DISCORD_GUILD_ID}"
DISCORD_CHANNEL_ID: "${DISCORD_CHANNEL_ID}"
# LLM configuration
LLM_BASE_URL: ${LLM_BASE_URL:-http://192.168.1.200:5005/v1}
LLM_MODEL: ${LLM_MODEL:-koboldcpp/Broken-Tutu-24B-Transgression-v2.0.i1-Q4_K_M}
# Admin interface configuration
ADMIN_HOST: 0.0.0.0
ADMIN_PORT: ${ADMIN_PORT:-8294}
SECRET_KEY: ${SECRET_KEY:-your-secret-key-here}
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin123}
ports:
- "${ADMIN_PORT:-8294}:8294"
volumes:
- ./logs:/app/logs
- ./config:/app/config
restart: unless-stopped
networks:
- fishbowl-network
volumes:
postgres_data:
redis_data:
chroma_data:
qdrant_data:
networks:
fishbowl-network:
driver: bridge