-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (84 loc) · 3.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (84 loc) · 3.17 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
# ==============================================================
# balddev DAO Voting Program — Docker Compose
# ==============================================================
#
# Services
# build — compiles the BPF/SBF program
# localnet — persistent solana-test-validator with program deployed
# test — Anchor test suite (waits for localnet to be healthy)
# verify — Kani formal verification (self-contained, no validator)
#
# Quick start:
# docker compose run --rm build # compile program
# docker compose up localnet # start local validator
# docker compose run --rm test # run tests against localnet
# docker compose run --rm verify # run Kani proofs
# ==============================================================
services:
# ── Program build ──────────────────────────────────────────────────────────
build:
build:
context: .
target: builder
image: balddev-dao-voting:builder
volumes:
- target:/app/target
command: anchor build
# ── Local validator ────────────────────────────────────────────────────────
localnet:
build:
context: .
target: builder
image: balddev-dao-voting:builder
volumes:
- target:/app/target
- ledger:/root/.config/solana/test-ledger
ports:
- "8899:8899" # JSON-RPC
- "8900:8900" # WebSocket
command: >
solana-test-validator
--reset
--bpf-program Cz7vK7QDJ8MYVUsgYxvEudXEZbAFqGYfzPuhUS5RWKjm
target/deploy/balddev_dao_voting.so
--log
healthcheck:
test:
- "CMD-SHELL"
- "solana cluster-version --url http://localhost:8899 >/dev/null 2>&1"
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
# ── Test suite ─────────────────────────────────────────────────────────────
test:
build:
context: .
target: test
image: balddev-dao-voting:test
volumes:
- target:/app/target
environment:
ANCHOR_PROVIDER_URL: http://localnet:8899
ANCHOR_WALLET: /root/.config/solana/id.json
depends_on:
localnet:
condition: service_healthy
command: anchor test --skip-local-validator
# ── Kani formal verification ───────────────────────────────────────────────
verify:
build:
context: .
target: kani
image: balddev-dao-voting:kani
volumes:
- kani-proofs:/app/kani_verification/proofs
command: ./verify.sh
# ── Named volumes ──────────────────────────────────────────────────────────
volumes:
target:
driver: local
ledger:
driver: local
kani-proofs:
driver: local