-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
352 lines (332 loc) · 8.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
352 lines (332 loc) · 8.97 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
# SPDX-License-Identifier: Apache-2.0
# Copyright 2025 SentinelOps Platform Contributors
#
# Profiles: default (no profile) = platform + sidecar
# docker compose up
# Ledger stack (postgres, redis, ledger GraphQL/MCP):
# docker compose --profile ledger up
# Runtime enforcement (egress-firewall):
# docker compose --profile enforcement up
# Full stack (adds console, demos, monitoring, ledger, enforcement):
# docker compose --profile full up
services:
# Database services
postgres:
image: postgres:15
environment:
POSTGRES_DB: sentinelops
POSTGRES_USER: sentinelops
POSTGRES_PASSWORD: sentinelops_password
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/db/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./scripts/db/init-ledger-db.sh:/docker-entrypoint-initdb.d/init-ledger-db.sh
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sentinelops"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
# ports:
# - "6379:6379"
expose:
- "6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Platform services
api-gateway:
build:
context: ./services/api-gateway
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- SPEC_SERVICE_URL=http://spec-service:8001
- PROOF_SERVICE_URL=http://proof-service:8002
- BUILD_SERVICE_URL=http://build-orchestrator:8003
- EVIDENCE_SERVICE_URL=http://evidence-service:8004
- REPLAY_SERVICE_URL=http://replay-service:8005
- RUNTIME_SERVICE_URL=http://runtime-sidecar:8006
depends_on:
- spec-service
- proof-service
- build-orchestrator
- evidence-service
- replay-service
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
spec-service:
build:
context: ./services/spec-service
dockerfile: Dockerfile
ports:
- "8001:8001"
environment:
- PORT=8001
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8001/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
proof-service:
build:
context: ./services/proof-service
dockerfile: Dockerfile
ports:
- "8002:8002"
environment:
- PORT=8002
- PROOF_CACHE_PATH=/tmp/proof-cache
- MORPH_ENABLED=false
volumes:
- proof_cache:/tmp/proof-cache
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
build-orchestrator:
build:
context: ./services/build-orchestrator
dockerfile: Dockerfile
ports:
- "8003:8003"
environment:
- PORT=8003
- BUILD_CACHE_PATH=/tmp/build-cache
volumes:
- build_cache:/tmp/build-cache
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
evidence-service:
build:
context: ./services/evidence-service
dockerfile: Dockerfile
ports:
- "8004:8004"
environment:
- PORT=8004
- DATABASE_URL=postgres://sentinelops:sentinelops_password@postgres:5432/sentinelops
- EVIDENCE_STORAGE_PATH=/tmp/evidence
volumes:
- evidence_data:/tmp/evidence
- ./external/CERT-V1:/root/external/CERT-V1:ro
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8004/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
replay-service:
build:
context: ./services/replay-service
dockerfile: Dockerfile
ports:
- "8005:8005"
environment:
- PORT=8005
- REPLAY_WORKING_DIR=/tmp/replay-jobs
- REPLAY_KIT_PATH=/app/external/TRACE-REPLAY-KIT/runner.py
volumes:
- replay_data:/tmp/replay-jobs
- ./external/TRACE-REPLAY-KIT:/app/external/TRACE-REPLAY-KIT
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8005/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
runtime-sidecar:
build:
context: .
dockerfile: runtime/sidecar-watcher/Dockerfile
ports:
- "8006:8006"
# - "9090:9090"
expose:
- "9090" # Metrics port
environment:
- PORT=8006
- METRICS_PORT=9090
- REDIS_URL=redis://redis:6379
- ENFORCEMENT_MODE=enforce
- PF_PROFILE=production
- PF_ENFORCE_DSSE=1
- PF_ENABLED_TOOLS=
- TENANT_ID=demo-tenant
- LEDGER_URL=http://ledger:4000
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/metrics"]
interval: 30s
timeout: 10s
retries: 3
# Ledger GraphQL + MCP (ledger / full profiles)
ledger:
profiles: ["ledger", "full"]
build:
context: ./runtime/ledger
dockerfile: Dockerfile
ports:
- "4000:4000"
environment:
- PROFILE=production
- PORT=4000
- PF_ENFORCE_DSSE=1
- PF_ENABLED_TOOLS=
- DATABASE_URL=postgresql://sentinelops:sentinelops_password@postgres:5432/ledger?schema=public
- SIDECAR_URL=http://runtime-sidecar:8006
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 5
# Egress firewall (enforcement / full profiles)
egress-firewall:
profiles: ["enforcement", "full"]
build:
context: ./runtime/egress-firewall
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- RUST_LOG=info
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8081/health"]
interval: 30s
timeout: 10s
retries: 3
# Retrieval gateway (full profile)
retrieval-gateway:
profiles: ["full"]
build:
context: .
dockerfile: runtime/retrieval-gateway/Dockerfile
ports:
- "8080:8080"
environment:
- RECEIPT_SIGNING_KEY=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
- LEDGER_ENDPOINT=http://ledger:4000
- RUST_LOG=info
depends_on:
ledger:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
# Tool broker demo (full profile; batch-style binary)
tool-broker:
profiles: ["full"]
build:
context: .
dockerfile: runtime/tool-broker/Dockerfile
environment:
- KERNEL_URL=http://runtime-sidecar:8006
- RUST_LOG=info
depends_on:
runtime-sidecar:
condition: service_healthy
restart: "no"
# WASM adapter sandbox CLI (full profile; invoke with module args via compose run)
wasm-sandbox:
profiles: ["full"]
build:
context: .
dockerfile: runtime/wasm-sandbox/Dockerfile
entrypoint: ["wasm-sandbox", "--help"]
restart: "no"
# Console Web UI (full stack only)
console:
profiles: ["full"]
build:
context: ./console
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- REACT_APP_API_BASE_URL=http://localhost:8000
depends_on:
- api-gateway
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
# Demo application (full stack only)
verifiable-mcp-fraud:
profiles: ["full"]
build:
context: .
dockerfile: demos/verifiable-mcp-fraud/Dockerfile
ports:
- "3001:3001"
environment:
- SENTINELOPS_API_URL=http://api-gateway:8000
- TENANT_ID=acme-corp
- SIDECAR_URL=http://runtime-sidecar:8006
depends_on:
- api-gateway
- runtime-sidecar
# Monitoring (full stack only)
grafana:
profiles: ["full"]
image: grafana/grafana:latest
ports:
- "3003:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana_data:/var/lib/grafana
- ./ops/grafana/dashboards:/var/lib/grafana/dashboards
- ./ops/grafana/provisioning:/etc/grafana/provisioning
depends_on:
- prometheus
prometheus:
profiles: ["full"]
image: prom/prometheus:latest
ports:
- "9091:9090"
volumes:
- ./ops/prometheus/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"
volumes:
postgres_data:
redis_data:
proof_cache:
build_cache:
evidence_data:
replay_data:
grafana_data:
prometheus_data:
networks:
default:
name: sentinelops-platform