Fix CMD_DB_URL setting for postgres

This commit is contained in:
3wc
2025-02-24 12:32:54 -05:00
parent 4972af78e8
commit 674cbd0431
3 changed files with 5 additions and 3 deletions

View File

@ -40,7 +40,9 @@ main() {
main
export CMD_DB_URL="${CMD_DB_URL:-postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME}"
if [ -n "$POSTGRES_ENABLED" ]; then
export CMD_DB_URL="postgres://$CMD_DB_USER:$CMD_DB_PASSWORD@$CMD_DB_HOST:5432/$CMD_DB_NAME"
fi
# 3wc: `source /docker-entrypoint.sh -e` to load CMD_DB_URL for CLI scripts
if [ ! "${1-}" == "-e" ]; then