fix(installer): fix ClickHouse health check and normalize hostname
- ClickHouse health check: use $CLICKHOUSE_PASSWORD directly instead of extracting from .env via grep (nested quoting broke in eval) - Normalize auto-detected hostname to lowercase (Windows returns uppercase which causes OIDC issuer case mismatches) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -353,6 +353,8 @@ check_port_available() {
|
||||
auto_detect() {
|
||||
if [ -z "$PUBLIC_HOST" ]; then
|
||||
PUBLIC_HOST=$(hostname -f 2>/dev/null || hostname 2>/dev/null || echo "localhost")
|
||||
# Normalize to lowercase (Windows hostnames are uppercase)
|
||||
PUBLIC_HOST=$(echo "$PUBLIC_HOST" | tr '[:upper:]' '[:lower:]')
|
||||
local primary_ip
|
||||
primary_ip=$(ip route get 1.1.1.1 2>/dev/null | awk '{print $7; exit}' || true)
|
||||
if [ -n "$primary_ip" ]; then
|
||||
@@ -929,7 +931,7 @@ verify_health() {
|
||||
120 || failed=1
|
||||
|
||||
[ $failed -eq 0 ] && check_service_health "ClickHouse" \
|
||||
"cd '$INSTALL_DIR' && docker compose -p '$COMPOSE_PROJECT' exec -T clickhouse clickhouse-client --password \"\$(grep CLICKHOUSE_PASSWORD '$INSTALL_DIR/.env' | cut -d= -f2)\" --query 'SELECT 1'" \
|
||||
"cd '$INSTALL_DIR' && docker compose -p '$COMPOSE_PROJECT' exec -T clickhouse clickhouse-client --password '$CLICKHOUSE_PASSWORD' --query 'SELECT 1'" \
|
||||
120 || failed=1
|
||||
|
||||
[ $failed -eq 0 ] && check_service_health "Logto" \
|
||||
|
||||
Reference in New Issue
Block a user