Skip to content

fix(dev-env): correct Keycloak healthcheck port and migrations auto-apply doc - #4170

Open
jdavidroberts wants to merge 2 commits into
block:mainfrom
jdavidroberts:chore/dev-env-cleanup
Open

fix(dev-env): correct Keycloak healthcheck port and migrations auto-apply doc#4170
jdavidroberts wants to merge 2 commits into
block:mainfrom
jdavidroberts:chore/dev-env-cleanup

Conversation

@jdavidroberts

Copy link
Copy Markdown

What

  • Point Keycloak's docker-compose healthcheck at its management port (9000)
    instead of the main port (8080), where /health/ready 404s.
  • Correct AGENTS.md's repo-structure comment: migrations are not
    "auto-applied on relay startup" by default — BUZZ_AUTO_MIGRATE defaults
    to false, and local dev applies them via just migrate/just setup.

Why

Ran into both while onboarding a fresh clone. Keycloak reported "unhealthy"
in docker compose ps despite starting fine — Keycloak 26 moved health
endpoints to a separate management interface on port 9000 by default, so
the existing healthcheck (written for port 8080) always 404'd. Separately,
the relay's boot log said "Skipping database migrations because
BUZZ_AUTO_MIGRATE is not enabled," which contradicted the repo-structure
doc.

Note: I also found stale TYPESENSE_* vars in the root .env.example
during this pass, but that's already covered by #2555, so I left it out
here to avoid duplicating that effort.

Testing

  • docker compose up -d keycloak — container now reports healthy within
    ~15s (previously stayed unhealthy indefinitely)
  • docker compose config --quiet — validates
  • just ci — full local gate passes (fmt, clippy, unit tests, desktop
    build, Tauri check, mobile tests — 1022 mobile tests passed)

Searched open/closed PRs and issues for "keycloak", "typesense", and
"BUZZ_AUTO_MIGRATE" — no overlap besides #2555 noted above.

🤖 Generated with Claude Code

Keycloak 26 moved health endpoints to a separate management interface on port 9000 by default (see the started-server log: Management interface listening on http://0.0.0.0:9000). The healthcheck was probing /health/ready on the main port 8080, which 404s, so the container always reported unhealthy even though Keycloak started fine. Set KC_HEALTH_ENABLED and point the probe at port 9000; verified it now flips to healthy within a few retries.

Signed-off-by: David Roberts <david.jdr.roberts@gmail.com>
migrations/ was documented as auto-applied on relay startup, but BUZZ_AUTO_MIGRATE defaults to false (see TESTING.md and main.rs). Local dev applies migrations via just migrate/just setup, and the relay skips its embedded migration step unless the flag is explicitly on. Only the Helm chart deploy defaults it to true. Noticed this while setting up a fresh clone: the relay boot log clearly said migrations were being skipped, which did not match the doc.

Signed-off-by: David Roberts <david.jdr.roberts@gmail.com>
@jdavidroberts
jdavidroberts requested a review from a team as a code owner August 1, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant