-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
78 lines (74 loc) · 1.66 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
78 lines (74 loc) · 1.66 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
version: '3.8'
services:
qdrant:
image: qdrant/qdrant:latest
container_name: visiontext-qdrant-prod
ports:
- "6333:6333"
volumes:
- qdrant_storage_prod:/qdrant/storage
environment:
- QDRANT__SERVICE__GRPC_PORT=6334
networks:
- visiontext-network-prod
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
interval: 30s
timeout: 10s
retries: 5
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '1'
memory: 1G
app:
build:
context: .
dockerfile: Dockerfile
container_name: visiontext-app-prod
ports:
- "8000:8000"
volumes:
- uploads_prod:/app/uploads
- huggingface_cache_prod:/root/.cache/huggingface
environment:
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
- COLLECTION_NAME=images
- EMBEDDING_DIM=768
- HF_TOKEN=${HF_TOKEN}
- PYTHONUNBUFFERED=1
depends_on:
qdrant:
condition: service_healthy
networks:
- visiontext-network-prod
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/stats"]
interval: 30s
timeout: 10s
retries: 5
deploy:
resources:
limits:
cpus: '4'
memory: 4G
reservations:
cpus: '2'
memory: 2G
command: uvicorn main:app --host 0.0.0.0 --port 8000 --workers 4
networks:
visiontext-network-prod:
driver: bridge
volumes:
qdrant_storage_prod:
driver: local
uploads_prod:
driver: local
huggingface_cache_prod:
driver: local