Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (52 loc) · 1.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (52 loc) · 1.88 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
# Local demo: `docker compose up --build`.
#
# engine seeds a demo workspace in the shared /data volume, signs the
# sample project as the approved baseline, then watches it.
# ui serves the read-only dashboard on http://127.0.0.1:8501.
# attacker (profile "tools") tampers with the watched file on request, so
# you can watch the engine and dashboard react:
#
# docker compose run --rm attacker # invert a contact
# docker compose run --rm attacker demo attack list # all scenarios
# docker compose run --rm attacker demo attack raise-setpoint
#
# OT_GUARD_SECRET_KEY below is the public demo value on purpose. A real
# deployment supplies its own secret (a secrets manager, or an uncommitted
# .env) and never reuses this one - it is what signs baselines and the ledger.
services:
engine:
build: .
entrypoint: ["sh", "-c", "otguard demo init /data --approve && exec otguard watch"]
environment:
OT_GUARD_SECRET_KEY: demo-local-only-do-not-use-in-production
volumes:
- otguard-data:/data
restart: unless-stopped
ui:
build: .
# Wait for the engine to create the workspace, then serve the dashboard.
entrypoint:
- sh
- -c
- 'until [ -f /data/otguard.toml ]; do sleep 1; done; exec streamlit run ui/app.py --server.port=8501 --server.address=0.0.0.0 --server.headless=true'
environment:
OT_GUARD_SECRET_KEY: demo-local-only-do-not-use-in-production
volumes:
- otguard-data:/data:ro
ports:
- "127.0.0.1:8501:8501"
depends_on:
- engine
restart: unless-stopped
attacker:
build: .
entrypoint: ["otguard"]
command: ["demo", "attack", "invert-contact"]
environment:
OT_GUARD_SECRET_KEY: demo-local-only-do-not-use-in-production
volumes:
- otguard-data:/data
profiles:
- tools
volumes:
otguard-data: