diff --git a/8.0/run.sh b/8.0/run.sh index 41dc889..f0f637c 100755 --- a/8.0/run.sh +++ b/8.0/run.sh @@ -1,10 +1,13 @@ #!/bin/bash +set -e + # set odoo database host, port, user and password -export PGHOST=$DB_PORT_5432_TCP_ADDR -export PGPORT=$DB_PORT_5432_TCP_PORT -export PGUSER=$DB_ENV_POSTGRES_USER -export PGPASSWORD=$DB_ENV_POSTGRES_PASSWORD +: ${PGHOST:=$DB_PORT_5432_TCP_ADDR} +: ${PGPORT:=$DB_PORT_5432_TCP_PORT} +: ${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}} +: ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD} +export PGHOST PGPORT PGUSER PGPASSWORD [ "$1" != "--" ] && exec "$@"