- Update docker-start.sh to force correct profiles (qdrant, admin) - Fix PostgreSQL port mapping from 5432 to 15432 across all configs - Resolve MCP import conflicts by renaming src/mcp to src/mcp_servers - Fix admin interface StaticFiles mount syntax error - Update LLM client to support both Ollama and OpenAI-compatible APIs - Configure host networking for Discord bot container access - Correct database connection handling for async context managers - Update environment variables and Docker compose configurations - Add missing production dependencies and Dockerfile improvements
164 lines
4.1 KiB
YAML
164 lines
4.1 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 (alternative to ChromaDB)
|
|
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
|
|
profiles:
|
|
- qdrant
|
|
|
|
fishbowl:
|
|
build: .
|
|
network_mode: host
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
environment:
|
|
# Database configuration
|
|
DATABASE_URL: postgresql+asyncpg://postgres:${DB_PASSWORD:-fishbowl_password}@localhost:15432/discord_fishbowl
|
|
DB_HOST: localhost
|
|
DB_PORT: 15432
|
|
DB_PASSWORD: ${DB_PASSWORD:-fishbowl_password}
|
|
DB_NAME: discord_fishbowl
|
|
DB_USER: postgres
|
|
|
|
# Redis configuration
|
|
REDIS_HOST: localhost
|
|
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://host.docker.internal:11434}
|
|
LLM_MODEL: ${LLM_MODEL:-llama2}
|
|
|
|
# Application configuration
|
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
|
ENVIRONMENT: production
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./config:/app/config
|
|
restart: unless-stopped
|
|
|
|
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://host.docker.internal:11434}
|
|
LLM_MODEL: ${LLM_MODEL:-llama2}
|
|
|
|
# Admin interface configuration
|
|
ADMIN_HOST: 0.0.0.0
|
|
ADMIN_PORT: ${ADMIN_PORT:-8000}
|
|
SECRET_KEY: ${SECRET_KEY:-your-secret-key-here}
|
|
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin123}
|
|
ports:
|
|
- "${ADMIN_PORT:-8000}:${ADMIN_PORT:-8000}"
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./config:/app/config
|
|
restart: unless-stopped
|
|
networks:
|
|
- fishbowl-network
|
|
profiles:
|
|
- admin
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
chroma_data:
|
|
qdrant_data:
|
|
|
|
networks:
|
|
fishbowl-network:
|
|
driver: bridge |