-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
225 lines (215 loc) · 5.32 KB
/
docker-compose.yml
File metadata and controls
225 lines (215 loc) · 5.32 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
container_name: qlens-es
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- ELASTIC_PASSWORD=
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
networks:
- querylens-network
healthcheck:
test: ["CMD-SHELL", "curl -k http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
ingestion:
build: ./ingestion-service
container_name: qlens-ingest
environment:
- APP_HOST=0.0.0.0
- APP_PORT=8000
- KAFKA_BOOTSTRAP=kafka:9092
depends_on:
kafka:
condition: service_healthy
ports:
- "8000:8000"
networks:
- querylens-network
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8000/ || exit 1" ]
interval: 10s
timeout: 5s
start_period: 30s
retries: 3
prometheus:
image: prom/prometheus:latest
container_name: qlens-prometheus
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- querylens-network
depends_on:
- ingestion
grafana:
image: grafana/grafana:latest
container_name: qlens-grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
ports:
- "3000:3000"
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards
networks:
- querylens-network
depends_on:
- prometheus
redis:
image: redis:7-alpine
container_name: qlens-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- querylens-network
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 5s
retries: 3
embedding:
build: ./embedding-service
container_name: qlens-embedding
ports:
- "8002:8000" # API port (external:internal)
environment:
- API_HOST=0.0.0.0
- API_PORT=8000
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
- DEFAULT_MODEL=all-minilm-l6-v2
- MODEL_POOL_SIZE=4
- DEFAULT_BATCH_SIZE=32
- MAX_BATCH_SIZE=128
- MAX_TEXTS_PER_REQUEST=1000
depends_on:
redis:
condition: service_healthy
kafka:
condition: service_healthy
volumes:
- model_cache:/root/.cache/huggingface
networks:
- querylens-network
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
hostname: zookeeper
container_name: qlens-zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- zookeeper_data:/var/lib/zookeeper/data
- zookeeper_data:/var/lib/zookeeper/log
networks:
- querylens-network
kafka:
image: confluentinc/cp-kafka:7.4.0
hostname: kafka
container_name: qlens-kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
- kafka_data:/var/lib/kafka/data
healthcheck:
test:
[
"CMD-SHELL",
"echo > /dev/tcp/localhost/9092"
]
interval: 10s
retries: 5
networks:
- querylens-network
es-index:
build: ./es-index-service
container_name: qlens-es-index
environment:
- ES_HOST=http://elasticsearch:9200
- ES_INDEX=docs
- KAFKA_BOOTSTRAP=kafka:9092
- BULK_BATCH_SIZE=200
depends_on:
elasticsearch:
condition: service_healthy
kafka:
condition: service_healthy
networks:
- querylens-network
restart: unless-stopped
faiss-index:
build: ./faiss-index-service
container_name: qlens-faiss-indexer
environment:
- KAFKA_BROKERS=kafka:9092
- KAFKA_TOPIC=embeddings
- FAISS_INDEX_PATH=/data/faiss.index
- REDIS_URL=redis://redis:6379/0
- REBUILD_INTERVAL=10000
- INDEX_DIM=384
- METRICS_PORT=8001
depends_on:
kafka:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- faiss_index_data:/data
networks:
- querylens-network
restart: unless-stopped
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8001/metrics" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
esdata:
driver: local
redis_data:
driver: local
model_cache:
driver: local
kafka_data:
driver: local
zookeeper_data:
driver: local
faiss_index_data:
driver: local
networks:
querylens-network:
driver: bridge