-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (132 loc) · 3.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
139 lines (132 loc) · 3.46 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: '3.9'
services:
# Vector Database
qdrant:
image: qdrant/qdrant:latest
container_name: docintel-qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- ./data/qdrant:/qdrant/storage
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# Task Queue / Cache
redis:
image: redis:7-alpine
container_name: docintel-redis
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# Langfuse Observability (requires PostgreSQL)
langfuse-db:
image: postgres:16-alpine
container_name: docintel-langfuse-db
environment:
POSTGRES_USER: langfuse
POSTGRES_PASSWORD: langfuse_local_dev
POSTGRES_DB: langfuse
ports:
- "5433:5432"
volumes:
- ./data/langfuse-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U langfuse"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
langfuse:
image: langfuse/langfuse:2
container_name: docintel-langfuse
ports:
- "3001:3000"
environment:
DATABASE_URL: postgresql://langfuse:langfuse_local_dev@langfuse-db:5432/langfuse
NEXTAUTH_SECRET: docintel_local_secret_change_in_prod
SALT: docintel_local_salt_change_in_prod
NEXTAUTH_URL: http://localhost:3001
TELEMETRY_ENABLED: "false"
depends_on:
langfuse-db:
condition: service_healthy
restart: unless-stopped
# Backend API (FastAPI)
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: docintel-backend
ports:
- "8000:8000"
volumes:
- ./backend:/app
- ./data/documents:/app/documents
- ./data/sqlite:/app/data
env_file:
- .env
environment:
DATABASE_URL: sqlite+aiosqlite:///data/docintel.db
REDIS_URL: redis://redis:6379/0
QDRANT_URL: http://qdrant:6333
OLLAMA_URL: http://host.docker.internal:11434
LANGFUSE_HOST: http://langfuse:3000
depends_on:
redis:
condition: service_healthy
qdrant:
condition: service_healthy
restart: unless-stopped
# Celery Worker (Async Ingestion)
celery-worker:
build:
context: ./backend
dockerfile: Dockerfile
container_name: docintel-worker
command: celery -A app.tasks.celery_app worker --loglevel=info --concurrency=2 --pool=solo
volumes:
- ./backend:/app
- ./data/documents:/app/documents
- ./data/sqlite:/app/data
env_file:
- .env
environment:
DATABASE_URL: sqlite+aiosqlite:///data/docintel.db
REDIS_URL: redis://redis:6379/0
QDRANT_URL: http://qdrant:6333
OLLAMA_URL: http://host.docker.internal:11434
depends_on:
redis:
condition: service_healthy
qdrant:
condition: service_healthy
restart: unless-stopped
# Frontend (Next.js)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: docintel-frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
environment:
NEXT_PUBLIC_API_URL: http://localhost:8000
NEXT_PUBLIC_WS_URL: ws://localhost:8000
depends_on:
- backend
restart: unless-stopped