-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (98 loc) · 2.7 KB
/
docker-compose.yml
File metadata and controls
106 lines (98 loc) · 2.7 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
103
104
105
106
version: '3.8'
services:
# Redis for task queue and caching
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
# Main Streamlit application
app:
build: .
ports:
- "8501:8501"
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- REDIS_ENABLED=true
- REDIS_URL=redis://redis:6379
- ENABLE_BACKGROUND_TASKS=true
- OLLAMA_API_URL=http://host.docker.internal:11434/api
volumes:
- ./chroma_db:/app/chroma_db
- ./temp_audio:/app/temp_audio
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
# Celery worker for reasoning tasks
worker-reasoning:
build: .
command: celery -A tasks worker --loglevel=info --queues=reasoning --concurrency=2
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- OLLAMA_API_URL=http://host.docker.internal:11434/api
volumes:
- ./chroma_db:/app/chroma_db
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
# Celery worker for document processing tasks
worker-documents:
build: .
command: celery -A tasks worker --loglevel=info --queues=documents --concurrency=1
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- OLLAMA_API_URL=http://host.docker.internal:11434/api
volumes:
- ./chroma_db:/app/chroma_db
- ./uploads:/app/uploads
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
# Celery beat for scheduled tasks
beat:
build: .
command: celery -A tasks beat --loglevel=info
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
# Flower for monitoring Celery tasks
flower:
build: .
command: celery -A tasks flower --port=5555 --broker=redis://redis:6379/0
ports:
- "5555:5555"
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
chromadb:
image: chromadb/chroma:latest
ports:
- "8000:8000"
volumes:
- ./chroma_db:/chroma/chroma
environment:
- IS_PERSISTENT=TRUE
restart: unless-stopped
volumes:
redis_data: