forked from Dipraise1/Engram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 3.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (87 loc) · 3.13 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
version: "3.9"
# ── Profiles ──────────────────────────────────────────────────────────────────
# Default (FAISS — no Qdrant needed):
# docker compose up miner validator
#
# With Qdrant (production vector store):
# docker compose --profile qdrant up
# Set VECTOR_STORE_BACKEND=qdrant in .env.miner
services:
# ── Qdrant (optional — production vector store) ───────────────────────────
qdrant:
profiles: [qdrant]
image: qdrant/qdrant:v1.9.0 # pinned for reproducibility
ports:
- "127.0.0.1:6333:6333" # REST — localhost only
- "127.0.0.1:6334:6334" # gRPC — localhost only
volumes:
- qdrant_data:/qdrant/storage
environment:
QDRANT__SERVICE__GRPC_PORT: "6334"
QDRANT__STORAGE__ON_DISK_PAYLOAD: "true"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"]
interval: 30s
timeout: 10s
retries: 3
# ── Miner ─────────────────────────────────────────────────────────────────
miner:
build:
context: .
dockerfile: docker/miner.Dockerfile
ports:
- "8091:8091"
env_file: .env.miner
environment:
# Override these when running with --profile qdrant
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
volumes:
- miner_data:/app/data # persists FAISS index + ground truth
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
# ── Miner with Qdrant backend ──────────────────────────────────────────────
miner-qdrant:
profiles: [qdrant]
build:
context: .
dockerfile: docker/miner.Dockerfile
ports:
- "8091:8091"
env_file: .env.miner
environment:
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
- VECTOR_STORE_BACKEND=qdrant
volumes:
- miner_data:/app/data
depends_on:
qdrant:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8091/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
# ── Validator ─────────────────────────────────────────────────────────────
validator:
build:
context: .
dockerfile: docker/validator.Dockerfile
# Validator connects outbound to miners only — no public port.
env_file: .env.validator
volumes:
- validator_data:/app/data # persists ground truth + scoring state
restart: unless-stopped
volumes:
qdrant_data:
miner_data:
validator_data: