-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (92 loc) · 2.93 KB
/
docker-compose.yml
File metadata and controls
102 lines (92 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
version: '3.8'
services:
# Main Discord Bot Application
bot:
build:
context: .
dockerfile: Dockerfile
container_name: summarybot-ng
restart: unless-stopped
environment:
# Discord Configuration
- DISCORD_TOKEN=${DISCORD_TOKEN}
# LLM Provider Configuration
- LLM_ROUTE=${LLM_ROUTE:-openrouter}
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- OPENROUTER_MODEL=${OPENROUTER_MODEL:-anthropic/claude-3.5-sonnet}
# Database Configuration
- DATABASE_URL=sqlite:///data/summarybot.db
# Cache Configuration
# DATA-002: Default to 'memory' since Redis backend isn't implemented yet
# Set CACHE_BACKEND=redis when Redis support is added
- CACHE_BACKEND=${CACHE_BACKEND:-memory}
- REDIS_URL=redis://redis:6379/0
- CACHE_DEFAULT_TTL=${CACHE_DEFAULT_TTL:-3600}
- CACHE_MAX_SIZE=${CACHE_MAX_SIZE:-1000}
# Webhook Configuration
- WEBHOOK_ENABLED=${WEBHOOK_ENABLED:-true}
- WEBHOOK_HOST=0.0.0.0
- WEBHOOK_PORT=5000
# Phase 4: CORS origins must be explicitly configured - no default wildcard
- WEBHOOK_CORS_ORIGINS=${WEBHOOK_CORS_ORIGINS:?WEBHOOK_CORS_ORIGINS must be set explicitly}
# Application Configuration
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- MAX_MESSAGE_BATCH=${MAX_MESSAGE_BATCH:-10000}
- CACHE_TTL=${CACHE_TTL:-3600}
ports:
- "5000:5000" # Webhook API
volumes:
# Persist database and logs
- ./data:/app/data
- ./logs:/app/logs
depends_on:
- redis
networks:
- summarybot-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Redis Cache Service
redis:
image: redis:7-alpine
container_name: summarybot-redis
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis-data:/data
networks:
- summarybot-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Optional: PostgreSQL Database (uncomment to use instead of SQLite)
# postgres:
# image: postgres:15-alpine
# container_name: summarybot-postgres
# restart: unless-stopped
# environment:
# - POSTGRES_DB=summarybot
# - POSTGRES_USER=${POSTGRES_USER:-summarybot}
# - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
# volumes:
# - postgres-data:/var/lib/postgresql/data
# networks:
# - summarybot-network
# healthcheck:
# test: ["CMD-SHELL", "pg_isready -U summarybot"]
# interval: 10s
# timeout: 5s
# retries: 5
volumes:
redis-data:
driver: local
# postgres-data:
# driver: local
networks:
summarybot-network:
driver: bridge