-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
152 lines (145 loc) · 3.58 KB
/
docker-compose.yml
File metadata and controls
152 lines (145 loc) · 3.58 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
140
141
142
143
144
145
146
147
148
149
150
151
152
name: snappy
services:
qdrant:
container_name: qdrant
image: qdrant/qdrant:latest
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_data:/qdrant/storage
networks:
- snappy-network
restart: unless-stopped
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/6333 && echo -e 'GET /readyz HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && grep -q 'HTTP/1.1 200' <&3"]
interval: 10s
timeout: 5s
retries: 3
colpali:
container_name: colpali
build:
context: ./colpali
dockerfile: Dockerfile
image: colpali:latest
ports:
- "7000:7000"
env_file:
- ./colpali/.env
environment:
- HUGGINGFACE_HUB_CACHE=/data/hf-cache
volumes:
- hf_cache:/data/hf-cache
networks:
- snappy-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
deepseek-ocr:
container_name: deepseek-ocr
build:
context: ./deepseek-ocr
dockerfile: Dockerfile
image: deepseek-ocr:latest
ports:
- "8200:8200"
env_file:
- ./deepseek-ocr/.env
environment:
- HUGGINGFACE_HUB_CACHE=/data/hf-cache
volumes:
- hf_cache:/data/hf-cache
networks:
- snappy-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8200/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
image: backend:latest
ports:
- "8000:8000"
env_file:
- ./backend/.env
environment:
# Docker service names override localhost URLs
- COLPALI_URL=http://colpali:7000
- DEEPSEEK_OCR_ENABLED=${DEEPSEEK_OCR_ENABLED:-true}
- DEEPSEEK_OCR_URL=http://deepseek-ocr:8200
- QDRANT_URL=http://qdrant:6333
# Local storage configuration
- LOCAL_STORAGE_PATH=/app/storage
- LOCAL_STORAGE_PUBLIC_URL=${LOCAL_STORAGE_PUBLIC_URL:-http://localhost:8000/files}
volumes:
- ./backend:/app
- backend_cache:/root/.cache
- snappy_storage:/app/storage
networks:
- snappy-network
depends_on:
qdrant:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=http://localhost:8000
image: frontend:latest
ports:
- "3000:3000"
env_file:
- ./frontend/.env
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
- NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
- API_BASE_URL_INTERNAL=http://backend:8000
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
networks:
- snappy-network
depends_on:
- backend
restart: unless-stopped
volumes:
qdrant_data:
snappy_storage:
hf_cache:
backend_cache:
networks:
snappy-network:
driver: bridge