diff options
| author | Fuwn <[email protected]> | 2026-02-26 19:54:46 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 19:54:46 -0800 |
| commit | 3b05299b6e0badb0dbda62d2470a6b78d8e67ff4 (patch) | |
| tree | 877d1ae17271ecc1be885742c9a049abb069c55d /README.md | |
| parent | chore: update docker and compose development setup (diff) | |
| download | plutia-test-3b05299b6e0badb0dbda62d2470a6b78d8e67ff4.tar.xz plutia-test-3b05299b6e0badb0dbda62d2470a6b78d8e67ff4.zip | |
feat: add keygen command and inject docker build metadata
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -33,6 +33,40 @@ task verify:small task bench ``` +## Dev / Smoke Test (Docker Compose) + +```bash +VERSION="$(cat VERSION)" \ +COMMIT="$(git rev-parse --short HEAD)" \ +BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ +docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build +``` + +Compose build args are read from environment variables (`VERSION`, `COMMIT`, `BUILD_DATE`). +Equivalent direct build: + +```bash +docker build \ + --build-arg VERSION="$(cat VERSION)" \ + --build-arg COMMIT="$(git rev-parse --short HEAD)" \ + --build-arg BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ + -t plutia:local . +``` + +In a second terminal, generate the mirror signing key inside the running container: + +```bash +docker compose -f docker-compose.yml -f docker-compose.dev.yml exec plutia /app/plutia keygen --out=/var/lib/plutia/mirror.key +``` + +Verify checkpoint and proof endpoints: + +```bash +curl -sS http://127.0.0.1:8080/checkpoints/latest | jq . +DID="$(curl -sS 'http://127.0.0.1:8080/export?count=1' | head -n 1 | jq -r '.did')" +curl -sS "http://127.0.0.1:8080/did/${DID}/proof" | jq . +``` + ### CLI Commands ```bash @@ -42,6 +76,7 @@ plutia verify --config=config.default.yaml --did=did:plc:example plutia snapshot --config=config.default.yaml plutia bench --config=config.default.yaml --max-ops=200000 plutia compare --config=config.default.yaml --remote=https://mirror.example.com +plutia keygen --out=./mirror.key [--force] plutia version ``` |