-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
116 lines (108 loc) · 2.97 KB
/
docker-compose.yml
File metadata and controls
116 lines (108 loc) · 2.97 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
services:
# Qdrant Vector Database
qdrant:
image: qdrant/qdrant:v1.7.0
container_name: paleopal-qdrant
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant-data:/qdrant/storage
environment:
- QDRANT__SERVICE__HTTP_PORT=6333
- QDRANT__SERVICE__GRPC_PORT=6334
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:6333/healthz || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Isolated Python Execution Service
execution-service:
build:
context: ./backend/services/isolated_execution_service
dockerfile: Dockerfile
container_name: paleopal-execution-service
ports:
- "8001:8001"
volumes:
- execution-data:/app/data
mem_limit: 24g # Set this to what your host can spare
environment:
- MEM_LIMIT_GB=24
- EXECUTION_TIMEOUT_MINUTES=30
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: paleopal-backend
ports:
- "8000:8000"
volumes:
- backend-data:/app/data
- backend-libraries:/app/libraries
- execution-data:/app/execution_data:ro # Read-only access to execution plots
- ./backend/.env:/app/.env:ro
- ./backend/models_cache:/app/models_cache # Mount models cache directory
environment:
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
- OLLAMA_BASE_URL=http://host.docker.internal:11434
- EXECUTION_SERVICE_URL=http://execution-service:8001
- USE_ISOLATED_EXECUTION=true
- EXECUTION_TIMEOUT_MINUTES=30
- MODEL_CACHE_DIR=/app/models_cache
depends_on:
- qdrant
- execution-service
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# Frontend Web App
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- REACT_APP_MAPBOX_TOKEN=${REACT_APP_MAPBOX_TOKEN:-}
container_name: paleopal-frontend
ports:
- "3000:80"
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
# Persistent storage for Qdrant vector database
qdrant-data:
driver: local
# Persistent storage for backend data (SQLite, uploads, etc.)
backend-data:
driver: local
# Persistent storage for document libraries
backend-libraries:
driver: local
# Persistent storage for execution service data (state, plots)
execution-data:
driver: local
networks:
default:
name: paleopal-network