fix: wait for Dex discovery endpoint
Homelab Main / validate (push) Successful in 18s Details
Homelab Main / running-update (push) Successful in 8s Details
Homelab Main / debian-ops (push) Successful in 1m12s Details

This commit is contained in:
juvenal.diaz 2026-09-30 12:23:06 -06:00
parent 6dd6ebce82
commit 707c668dc7
1 changed files with 3 additions and 2 deletions

View File

@ -735,9 +735,10 @@ ENV_EOF
sudo docker compose --env-file "${install_dir}/.env" ps
)
until curl -fsS --connect-timeout 5 "http://127.0.0.1:${http_port}/healthz" >/dev/null; do
until curl -fsS --connect-timeout 5 "http://127.0.0.1:${http_port}/.well-known/openid-configuration" >/dev/null ||
curl -fsS --connect-timeout 5 "http://127.0.0.1:${telemetry_port}/healthz" >/dev/null; do
if ((elapsed >= 180)); then
echo "Timed out waiting for Dex on http://127.0.0.1:${http_port}/healthz" >&2
echo "Timed out waiting for Dex on http://127.0.0.1:${http_port}/.well-known/openid-configuration or http://127.0.0.1:${telemetry_port}/healthz" >&2
(cd "${install_dir}" && sudo docker compose --env-file "${install_dir}/.env" ps && sudo docker compose --env-file "${install_dir}/.env" logs --tail=160) >&2 || true
exit 1
fi