feat(ledger): add docker-compose smoke test for ledger stack - #145
Merged
Conversation
Two-service stack (ledger + postgres:17-alpine) plus scripts/demo.sh and a compose-smoke CI job that boots the distroless image against a real Postgres, polls /actuator/health/readiness within a 30s budget, asserts the public surface, and tears the stack down on failure. Validates the deferred live docker-compose dev boot. Closes #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a runnable two-service stack and a CI smoke that proves the ledger boots to a healthy state against a real PostgreSQL in under 30 seconds, closing the last open Epic E-01 ops acceptance criterion and the deferred live docker-compose dev boot (#62 AC-5).
docker-compose.yml(root):ledger(built from the root distroless Dockerfile) +postgres:17-alpine. Postgres carries apg_isreadyhealthcheck;ledgerwaits onservice_healthyand reaches Postgres by service name viaSPRING_DATASOURCE_*env. No broker, no IdP (the ledger has no Kafka dependency and the OAuth2 resource server uses a lazy decoder, so an unreachableKEYCLOAK_ISSUER_URIdoes not block readiness).scripts/demo.sh: strict bash smoke, polls/actuator/health/readinessevery 2s up to 30s, then asserts liveness and/v3/api-docs200. Runnable locally and from CI..github/workflows/ci.yml: newcompose-smokejob (needs: build-test) that builds the stack, runs the smoke, dumps container logs on failure, and tears the stack down unconditionally.Design notes
ledgerservice intentionally has no in-container healthcheck (aCMD-SHELL/curl probe would make it permanently unhealthy). The host-sidedemo.shpoll is the binding readiness gate; onlypostgrescarries a healthcheck.show-components: always.Verification
Infra + bash + CI only, zero Kotlin/app/migration changes. WSL has no Docker, so the
compose-smokeCI job is the binding evidence. Gate chain: analyst, architect, critic (GO-WITH-CHANGES, folded), code-reviewer, security-auditor (PASS).Closes #66