sync dari sicabe-doc/deploy @ e8f8fde
This commit is contained in:
@@ -188,6 +188,17 @@ sicabe_local_url() { # <scheme> <host_var> <port> [url_var]
|
||||
echo "${_slu_s}://localhost:${_slu_p}"
|
||||
}
|
||||
|
||||
# ─── Helper: URL Keycloak yang REACHABLE dari host ini ──────────────────────
|
||||
# Prioritas: KEYCLOAK_INTERNAL_URL (URL penuh skema+host+port, mis.
|
||||
# `https://sso.example.com` — generator menulisnya bila Keycloak EKSTERNAL ber-URL
|
||||
# penuh) → KEYCLOAK_URL eksplisit non-localhost (override operator) → host+port
|
||||
# (perilaku lama: nama service bila co-located, alamat pemilik bila lintas host).
|
||||
# Dipakai gate/verifikasi & bootstrap agar tak perlu set KEYCLOAK_URL manual.
|
||||
sicabe_keycloak_url() {
|
||||
if [[ -n "${KEYCLOAK_INTERNAL_URL:-}" ]]; then printf '%s' "${KEYCLOAK_INTERNAL_URL}"; return 0; fi
|
||||
sicabe_local_url http KEYCLOAK_HOST "${KEYCLOAK_PORT:-12080}" KEYCLOAK_URL
|
||||
}
|
||||
|
||||
# ─── Helper: HOST endpoint efektif (sadar EXTERNAL & multi-host) ────────────
|
||||
# Urutan: (1) <fallback_var> bila NON-localhost (override operator / komponen EXTERNAL);
|
||||
# (2) multi-host (SICABE_HOST_NAME) → <host_var>;
|
||||
|
||||
Reference in New Issue
Block a user