feat(zk-prover): add standalone compose workflow#2941
Conversation
Review SummaryThis PR adds a standalone Docker Compose stack ( FindingsMinor: Fragile YAML generation via string concatenation ( The inline Python one-liner generates a Docker Compose override file by concatenating a JSON-encoded path into a YAML template string. JSON and YAML double-quoted strings have subtly different escaping rules. While CA cert paths in practice are simple filesystem paths, consider using Notes (no action required)
|
Add a standalone ZK prover stack that can start cluster or dry-run mode from local network and cluster YAML without requiring callers to repeat the network for logs or shutdown. Co-authored-by: Cursor <cursoragent@cursor.com>
Generate the temporary CA mount override as JSON so Docker Compose parses paths without YAML escaping edge cases. Co-authored-by: Cursor <cursoragent@cursor.com>
6a41323 to
cd989c3
Compare
| - POSTGRES_SSLMODE=disable | ||
| - OTEL_SERVICE_NAME=base-prover-zk-${ZK_PROVER_NETWORK:-local} | ||
| healthcheck: | ||
| test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9000"] |
There was a problem hiding this comment.
The zk-prover runtime image is based on debian:trixie-slim with only ca-certificates and curl installed (runtime-base stage in Dockerfile.rust-services). bash is not present in that image, so this healthcheck will always fail with exec: "bash": executable file not found.
Since curl is installed in the runtime base, you could use:
| test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9000"] | |
| test: ["CMD", "curl", "-sf", "http://localhost:9000/"] |
Or if the gRPC endpoint doesn't respond to plain HTTP, a simple TCP check with the timeout utility (available in coreutils):
test: ["CMD-SHELL", "timeout 1 sh -c 'echo > /dev/tcp/localhost/9000' 2>/dev/null || curl -sf http://localhost:9000/ || exit 1"]
Note: /dev/tcp is a bash-only feature. For a POSIX shell alternative, consider using curl or installing netcat.
Summary
Test plan
Made with Cursor