-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
258 lines (243 loc) · 6.42 KB
/
Copy pathdocker-compose.yml
File metadata and controls
258 lines (243 loc) · 6.42 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
# SPDX-License-Identifier: Apache-2.0
# Copyright 2025 SentinelOps Platform Contributors
#
# Profiles: default (no profile) = platform only (postgres, redis, api-gateway, spec, proof, build, evidence, replay, runtime-sidecar).
# docker compose up
# Full stack (adds console, demos, monitoring):
# 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
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: ./runtime/sidecar-watcher
dockerfile: Dockerfile
ports:
- "8006:8006"
# - "9090:9090"
expose:
- "9090" # Metrics port
environment:
- PORT=8006
- METRICS_PORT=9090
- REDIS_URL=redis://redis:6379
- ENFORCEMENT_MODE=enforce
- TENANT_ID=demo-tenant
- LEDGER_URL=
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/metrics"]
interval: 30s
timeout: 10s
retries: 3
# 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