-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (74 loc) · 2.11 KB
/
docker-compose.yml
File metadata and controls
79 lines (74 loc) · 2.11 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
services:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
api:
image: ghcr.io/aniketbansod/ai-project-backend:prod-latest
env_file: backend.env
environment:
# Ensure internal service-to-service calls target the AI container over the Docker network
- AI_SERVICE_URL=http://ai:8000
# Queue and caches: use in-cluster Redis
- REDIS_URL=redis://redis:6379
depends_on:
- ai
- redis
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 5s
retries: 3
worker:
image: ghcr.io/aniketbansod/ai-project-worker:prod-latest
env_file: backend.env
environment:
# Ensure internal service-to-service calls target the AI container over the Docker network
- AI_SERVICE_URL=http://ai:8000
# Queue and caches: use in-cluster Redis
- REDIS_URL=redis://redis:6379
# Make sure the worker container runs the BullMQ worker process, not the API server
command: ["npm", "run", "start:worker"]
depends_on:
- api
- ai
- redis
restart: unless-stopped
ai:
image: ghcr.io/aniketbansod/ai-service:prod-latest
env_file: ai.env
environment:
- FAISS_INDEX_PATH=/app/data/faiss_index.bin
- FAISS_META_PATH=/app/data/faiss_meta.pkl
# Use Redis for caching detectors/BM25 if available
- REDIS_URL=redis://redis:6379
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
volumes:
- ai_index:/app/data
- hf_cache:/root/.cache/huggingface
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
volumes:
ai_index:
hf_cache:
caddy_data:
caddy_config: