feat: Default DB_HOST to 127.0.0.1 and DB_PORT to 15432 to ensure stunnel wait.

This commit is contained in:
Haitao Pan 2026-01-31 13:36:28 +08:00
parent cf1d5afd85
commit f1933408b5

View File

@ -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