Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
354 lines (340 loc) · 8.89 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
354 lines (340 loc) · 8.89 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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
services:
# Alertmanager
alertmanager:
image: prom/alertmanager:v0.28.0
ports:
- "9093:9093"
volumes:
- ./monitoring/alertmanager.yml:/etc/alertmanager/alertmanager.yml
- alertmanager_data:/alertmanager
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
- '--storage.path=/alertmanager'
networks:
- airis-network
restart: unless-stopped
# Prometheus
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- airis-network
restart: unless-stopped
# Grafana
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources
networks:
- airis-network
restart: unless-stopped
# PostgreSQL Database
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=airis
- POSTGRES_USER=airis
- POSTGRES_PASSWORD=airis
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- airis-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U airis -d airis"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- airis-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Smol3 Service
smol3:
image: ghcr.io/huggingface/text-generation-inference:latest
ports:
- "9000:9000"
environment:
- MODEL_ID=HuggingFaceTB/SmolLM3-3B
volumes:
- ./hf_cache:/data
networks:
- airis-network
restart: unless-stopped
# Chat Service
chat-service:
build:
context: ./services/chat-service
dockerfile: Dockerfile
target: development
ports:
- "8008:8008"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_chat
- REDIS_URL=redis://redis:6379
- SMOL3_API_URL=http://smol3:9000
- SMOL3_API_KEY=local-dev-key
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
smol3:
condition: service_started
networks:
- airis-network
volumes:
- ./services/chat-service:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8008/health"]
interval: 30s
timeout: 10s
retries: 3
# MCP Service
mcp-service:
build:
context: ./services/mcp-service
dockerfile: Dockerfile
target: development
ports:
- "8007:8007"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_mcp
- REDIS_URL=redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- airis-network
volumes:
- ./services/mcp-service:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8007/health"]
interval: 30s
timeout: 10s
retries: 3
# RAG Service
rag-service:
build:
context: ./services/rag-service
dockerfile: Dockerfile
target: development
ports:
- "8003:8003"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_rag
- REDIS_URL=redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- airis-network
volumes:
- ./services/rag-service:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
# Auth Service
auth-service:
build:
context: ./services/auth-service
dockerfile: Dockerfile
target: development
ports:
- "8001:8001"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_auth
- REDIS_URL=redis://redis:6379
- SECRET_KEY=your-secret-key-here
- ALGORITHM=HS256
- ACCESS_TOKEN_EXPIRE_MINUTES=30
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- airis-network
volumes:
- ./services/auth-service:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
# Storage Service
storage-service:
build:
context: ./services/storage-service
dockerfile: Dockerfile
target: development
ports:
- "8002:8002"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_storage
- REDIS_URL=redis://redis:6379
- STORAGE_PATH=/app/storage
- MAX_FILE_SIZE=100MB
- ALLOWED_EXTENSIONS=pdf,doc,docx,txt,jpg,jpeg,png,gif,mp4,avi,mov
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- airis-network
volumes:
- ./services/storage-service:/app
- storage_data:/app/storage
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 30s
timeout: 10s
retries: 3
# Monitoring Service
monitoring-service:
build:
context: ./services/monitoring-service
dockerfile: Dockerfile
target: development
ports:
- "8003:8003"
environment:
- ENVIRONMENT=development
- DEBUG=true
- DATABASE_URL=postgresql://airis:airis@postgres:5432/airis_monitoring
- REDIS_URL=redis://redis:6379
- PROMETHEUS_URL=http://prometheus:9090
- GRAFANA_URL=http://grafana:3000
- ALERTMANAGER_URL=http://alertmanager:9093
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
prometheus:
condition: service_started
grafana:
condition: service_started
alertmanager:
condition: service_started
networks:
- airis-network
volumes:
- ./services/monitoring-service:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
# API Gateway
api-gateway:
build:
context: ./services/api-gateway
dockerfile: Dockerfile
target: development
ports:
- "8000:8000"
environment:
- ENVIRONMENT=development
- DEBUG=true
- REDIS_URL=redis://redis:6379
- AUTH_SERVICE_URL=http://auth-service:8001
- STORAGE_SERVICE_URL=http://storage-service:8002
- MONITORING_SERVICE_URL=http://monitoring-service:8003
- PROMETHEUS_URL=http://prometheus:9090
- GRAFANA_URL=http://grafana:3000
- ALERTMANAGER_URL=http://alertmanager:9093
- MCP_SERVICE_URL=http://mcp-service:8007
- CHAT_SERVICE_URL=http://chat-service:8008
depends_on:
redis:
condition: service_healthy
auth-service:
condition: service_healthy
storage-service:
condition: service_healthy
monitoring-service:
condition: service_healthy
prometheus:
condition: service_started
grafana:
condition: service_started
alertmanager:
condition: service_started
mcp-service:
condition: service_healthy
chat-service:
condition: service_healthy
networks:
- airis-network
volumes:
- ./services/api-gateway:/app
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
redis_data:
storage_data:
prometheus_data:
grafana_data:
alertmanager_data:
networks:
airis-network:
driver: bridge