services: chroma: image: chromadb/chroma:latest volumes: - ./data/chroma:/chroma/chroma_storage ports: - "127.0.0.1:8001:8000" environment: - CHROMA_SERVER_HOST=0.0.0.0 - CHROMA_SERVER_PORT=8000 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/heartbeat"] interval: 10s timeout: 5s retries: 5 api: build: context: . dockerfile: Dockerfile volumes: - ./data:/app/data ports: - "127.0.0.1:8000:8000" environment: - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-} - OPENROUTER_MODEL=${OPENROUTER_MODEL:-stepfun/step-3.5-flash:free} - GITEA_TOKEN=${GITEA_TOKEN:-} - GITEA_OWNER=${GITEA_OWNER:-cal} - GITEA_REPO=${GITEA_REPO:-strat-chatbot} - DATA_DIR=/app/data - RULES_DIR=/app/data/rules - CHROMA_DIR=/app/data/chroma - DB_URL=sqlite+aiosqlite:///./data/conversations.db - API_SECRET=${API_SECRET:-} - CONVERSATION_TTL=1800 - TOP_K_RULES=10 - EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 depends_on: chroma: condition: service_healthy command: uvicorn main:app --host 0.0.0.0 --port 8000 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 15s timeout: 10s retries: 3 start_period: 30s discord-bot: build: context: . dockerfile: Dockerfile volumes: - ./data:/app/data environment: # The bot now calls ChatService directly — needs its own adapter config - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-} - OPENROUTER_MODEL=${OPENROUTER_MODEL:-stepfun/step-3.5-flash:free} - DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-} - DISCORD_GUILD_ID=${DISCORD_GUILD_ID:-} - GITEA_TOKEN=${GITEA_TOKEN:-} - GITEA_OWNER=${GITEA_OWNER:-cal} - GITEA_REPO=${GITEA_REPO:-strat-chatbot} - DATA_DIR=/app/data - RULES_DIR=/app/data/rules - CHROMA_DIR=/app/data/chroma - DB_URL=sqlite+aiosqlite:///./data/conversations.db - CONVERSATION_TTL=1800 - TOP_K_RULES=10 - EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 depends_on: chroma: condition: service_healthy command: python -m run_discord restart: unless-stopped