From f1933408b575c7029236850cb41fccb9fecda474 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 31 Jan 2026 13:36:28 +0800 Subject: [PATCH] feat: Default DB_HOST to 127.0.0.1 and DB_PORT to 15432 to ensure stunnel wait. --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index e59ea04..6b02a02 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,6 +31,10 @@ if [ -n "${PORT:-}" ]; then CONFIG_FILE="${tmp_cfg}" fi +# Default to 127.0.0.1:15432 if not specified, to ensure we wait for stunnel +DB_HOST="${DB_HOST:-127.0.0.1}" +DB_PORT="${DB_PORT:-15432}" + if [ -n "${DB_HOST:-}" ] && [ -n "${DB_PORT:-}" ]; then if [ "${DB_HOST}" = "127.0.0.1" ] || [ "${DB_HOST}" = "localhost" ]; then if command -v nc >/dev/null; then