-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (37 loc) · 946 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (37 loc) · 946 Bytes
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
version: "3.8"
services:
# ─── Python Backend (FastAPI + ML Model + RAG) ───
backend:
build:
context: .
dockerfile: Dockerfile
target: backend
ports:
- "8000:8000"
environment:
- GROQ_API_KEY=${GROQ_API_KEY}
volumes:
- ./model-rag:/app/model-rag
- ./.env:/app/.env
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# ─── Next.js Frontend ───
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend
ports:
- "3000:3000"
environment:
- FASTAPI_URL=http://backend:8000
- MONGODB_URI=${MONGODB_URI}
- GROQ_API_KEY=${GROQ_API_KEY}
depends_on:
backend:
condition: service_healthy
restart: unless-stopped