Repository navigation
Expand file tree
/
Copy pathdocker-compose.wave123.yml
More file actions
257 lines (247 loc) · 8.55 KB
/
Copy pathdocker-compose.wave123.yml
File metadata and controls
257 lines (247 loc) · 8.55 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
version: "3.9"
# ─── PayGate Wave 123 — AI Model Registry, Menu Management & Portal Health ────
#
# This overlay adds the infrastructure required by Wave 123 features:
# 1. MLflow Model Registry — tracks AI model versions, metrics, artifacts
# 2. MinIO Object Storage — stores model artifacts and training datasets
# 3. Feast Feature Store — serves ML features for GNN inference
# 4. Menu CDN Cache (Nginx) — caches menu API responses at the edge
# 5. Uptime Kuma — portal health monitoring dashboard
# 6. OpenTelemetry Collector — aggregates traces/metrics from all services
#
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.wave123.yml up -d
#
# Required env vars (add to .env):
# MLFLOW_TRACKING_URI, MINIO_ROOT_USER, MINIO_ROOT_PASSWORD,
# FEAST_REDIS_URL, OTEL_EXPORTER_OTLP_ENDPOINT
services:
# ── MLflow Model Registry ──────────────────────────────────────────────────
mlflow:
image: ghcr.io/mlflow/mlflow:v2.12.2
container_name: paygate_mlflow
restart: unless-stopped
command: >
mlflow server
--backend-store-uri postgresql://paygate:${POSTGRES_PASSWORD:-paygate_secure_2026}@postgres:5432/paygate_mlflow
--default-artifact-root s3://paygate-models/mlflow
--host 0.0.0.0
--port 5000
--workers 2
environment:
MLFLOW_S3_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-paygate_minio}
AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-paygate_minio_secret_2026}
ports:
- "5000:5000"
depends_on:
postgres:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "mlflow"
# ── MinIO Object Storage (model artifacts + training datasets) ─────────────
minio:
image: minio/minio:RELEASE.2024-04-18T19-09-19Z
container_name: paygate_minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-paygate_minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-paygate_minio_secret_2026}
MINIO_SITE_NAME: paygate-model-store
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "minio"
# ── MinIO Bucket Initializer ───────────────────────────────────────────────
minio-init:
image: minio/mc:RELEASE.2024-04-18T16-45-29Z
container_name: paygate_minio_init
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 ${MINIO_ROOT_USER:-paygate_minio} ${MINIO_ROOT_PASSWORD:-paygate_minio_secret_2026};
mc mb --ignore-existing local/paygate-models;
mc mb --ignore-existing local/paygate-datasets;
mc mb --ignore-existing local/paygate-menu-assets;
mc policy set public local/paygate-menu-assets;
echo 'MinIO buckets initialized';
"
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "minio-init"
# ── Feast Feature Store (online features for GNN inference) ───────────────
feast-online:
image: feastdev/feature-server:0.40.0
container_name: paygate_feast
restart: unless-stopped
command: serve --host 0.0.0.0 --port 6566
environment:
FEAST_REDIS_HOST: ${REDIS_HOST:-redis}
FEAST_REDIS_PORT: 6379
FEAST_REDIS_PASSWORD: ${REDIS_PASSWORD:-}
ports:
- "6566:6566"
depends_on:
- redis
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:6566/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "feast"
# ── Menu CDN Cache (Nginx edge cache for menu API) ─────────────────────────
menu-cdn:
image: nginx:1.25-alpine
container_name: paygate_menu_cdn
restart: unless-stopped
ports:
- "8090:80"
volumes:
- ./infra/nginx/menu-cdn.conf:/etc/nginx/conf.d/default.conf:ro
- menu_cache:/var/cache/nginx
depends_on:
- app
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:80/nginx-health"]
interval: 30s
timeout: 5s
retries: 3
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "menu-cdn"
# ── Uptime Kuma (Portal Health Monitoring) ─────────────────────────────────
uptime-kuma:
image: louislam/uptime-kuma:1.23.13
container_name: paygate_uptime_kuma
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- uptime_kuma_data:/app/data
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/entry-page"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "uptime-kuma"
# ── OpenTelemetry Collector (traces + metrics aggregation) ─────────────────
otel-collector:
image: otel/opentelemetry-collector-contrib:0.99.0
container_name: paygate_otel_collector
restart: unless-stopped
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./infra/otel/collector-config.yaml:/etc/otel-collector-config.yaml:ro
ports:
- "4317:4317" # gRPC OTLP receiver
- "4318:4318" # HTTP OTLP receiver
- "8888:8888" # Prometheus metrics
- "8889:8889" # Prometheus exporter
depends_on:
- app
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:13133/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "otel-collector"
# ── GNN Training Worker (Python, GPU-optional) ────────────────────────────
gnn-worker:
image: paygate/gnn-worker:latest
build:
context: ./ml
dockerfile: Dockerfile.gnn
container_name: paygate_gnn_worker
restart: unless-stopped
environment:
MLFLOW_TRACKING_URI: http://mlflow:5000
MLFLOW_S3_ENDPOINT_URL: http://minio:9000
AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-paygate_minio}
AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-paygate_minio_secret_2026}
REDIS_URL: redis://redis:6379
FEAST_ENDPOINT: http://feast-online:6566
LOG_LEVEL: ${LOG_LEVEL:-info}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
depends_on:
- mlflow
- minio
- feast-online
- redis
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
networks:
- paygate_net
labels:
com.paygate.wave: "123"
com.paygate.service: "gnn-worker"
profiles:
- ml # Only start with: docker compose --profile ml up
# ── Volumes ───────────────────────────────────────────────────────────────────
volumes:
minio_data:
driver: local
labels:
com.paygate.wave: "123"
menu_cache:
driver: local
labels:
com.paygate.wave: "123"
uptime_kuma_data:
driver: local
labels:
com.paygate.wave: "123"
# ── Networks ──────────────────────────────────────────────────────────────────
# Reuse the existing paygate_net from docker-compose.yml
networks:
paygate_net:
external: true