Skip to content

Add dedicated Keycloak readiness gate to prevent Intel starting too e…#205

Merged
nmorenor merged 2 commits intodevfrom
CTND-3-initial-up-command-always-fails-as-codetogether-intel-starts-too-early
Mar 5, 2026
Merged

Add dedicated Keycloak readiness gate to prevent Intel starting too e…#205
nmorenor merged 2 commits intodevfrom
CTND-3-initial-up-command-always-fails-as-codetogether-intel-starts-too-early

Conversation

@danc094codetogether
Copy link
Contributor

…arly

This PR adds an optional Docker Compose overlay that supports customers running a dedicated/external Keycloak (Keycloak not started by our compose stack).

Some customers still use an external Keycloak. In this mode, the previously recommended depends_on: codetogether-keycloak: condition: service_healthy cannot apply, because there is no codetogether-keycloak service in the final stack. As a result, docker compose up --wait can fail because codetogether-intel starts before Keycloak is reachable.

Add a new compose overlay: compose/compose.dedicated-keycloak.yaml

Introduces a lightweight keycloak-ready service with a healthcheck that polls: https://${KEYCLOAK_FQDN}/realms/${KEYCLOAK_REALM}/.well-known/openid-configuration

Makes codetogether-intel depend on:

  • cassandra: service_healthy (keep existing dependency)

  • keycloak-ready: service_healthy (new gate)

  • Add a short compose/README.md describing:

  • required .env variables (KEYCLOAK_FQDN, KEYCLOAK_REALM)

  • exact docker compose command using the overlay

docker compose \
  -f compose/compose.yaml \ -f compose/compose.dedicated-keycloak.yaml \ --env-file ./.env \ up --pull always --wait -d

…arly

This PR adds an optional Docker Compose overlay that supports customers running a dedicated/external Keycloak (Keycloak not started by our compose stack).

Some customers still use an external Keycloak. In this mode, the previously recommended depends_on: codetogether-keycloak: condition: service_healthy cannot apply, because there is no codetogether-keycloak service in the final stack. As a result, docker compose up --wait can fail because codetogether-intel starts before Keycloak is reachable.

Add a new compose overlay: compose/compose.dedicated-keycloak.yaml

Introduces a lightweight keycloak-ready service with a healthcheck that polls:
https://${KEYCLOAK_FQDN}/realms/${KEYCLOAK_REALM}/.well-known/openid-configuration

Makes codetogether-intel depend on:

- cassandra: service_healthy (keep existing dependency)
- keycloak-ready: service_healthy (new gate)

- Add a short compose/README.md describing:
- required .env variables (KEYCLOAK_FQDN, KEYCLOAK_REALM)
- exact docker compose command using the overlay

docker compose \
  -f compose/compose.yaml \
  -f compose/compose.dedicated-keycloak.yaml \
  --env-file ./.env \
  up --pull always --wait -d
@nmorenor nmorenor merged commit ebeab76 into dev Mar 5, 2026
1 check passed
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.

2 participants