feat(dev): local docker-compose stack #4
Reference in New Issue
Block a user
Delete Branch "feat/dev-stack"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
dev/docker-compose.ymlbrings up Keycloak 26 (:8080) + pg-keycloak + pg-app (:5432) + Redis (:6379) + Mongo (:27017) + MinIO (:9000/9001).dev/keycloak/realm-export.jsonships thebreakpilot-devrealm with two seed users, a public PKCE client for the portal (redirect URIs coverhttp://*.localhost:3000/*), and protocol mappers projectingtenant_id/tenant_slug/org_roles/products/plan/tenant_statusclaims.make dev-up/dev-down/dev-reset/dev-logstargets on the root Makefile.dev/README.mdwith first-login walkthrough.Why
Unblock local-dev work on
tenant-registryandportalwithout waiting for M1.2 (VMs), M0.3 (DNS), or M2.1 (prod Keycloak deploy). PerINFRASTRUCTURE.md §1, dev runs entirely on developer laptops via docker-compose — this is that compose. Lands here inorca-platformbecause this repo already owns the production topology this dev stack mirrors.Linked milestone: bootstrap for M4.1 / M5.1 local work
How
name: breakpilot-devcompose project on its own bridge network.start-dev --import-realmmountingrealm-export.jsonread-only — fires on the first boot, idempotent on subsequent ups (Keycloak skips if the realm already exists).tenant_id/tenant_slug/org_roles/products/plan/tenant_statusset as Keycloak user attributes. Mappers project them into every JWT, matching the production contract fromPLATFORM_ARCHITECTURE.md §6so the same portal middleware code works dev → prod.Test plan
docker compose -f dev/docker-compose.yml config -q✅python3 -c 'json.load(open("dev/keycloak/realm-export.json"))'✅make validate(manifest TOML check) ✅ unaffectedmake dev-up→ realm UI shows the seed user. (Run locally once this lands — not in CI.)Risk
Blast radius: developer laptops only. Nothing in prod touched.
What could break:
make dev-upon a slow laptop: Keycloak import takes ~30s. The healthcheck has a 30s start_period.Rollback plan:
make dev-down -vwipes everything; revert the PR if the compose itself is broken.Checklist
dev/README.md+ rootREADME.md+ CHANGELOG)keycloak-dev-pass,platform-dev-pass, etc.) since they only protect a loopback compose. Anything real lands via Infisical perPRODUCT_INTEGRATION_SPEC.md §9.4.