feat: add the possibility to override the DATABASE_URL by setting it in the environment

This commit is contained in:
Jelmert 2019-10-21 09:32:02 +02:00
parent 3b4d6857f0
commit 2ede8e0479

View File

@ -14,7 +14,10 @@ if [ -z "${POSTGRES_USER}" ]; then
base_postgres_image_default_user='postgres'
export POSTGRES_USER="${base_postgres_image_default_user}"
fi
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
if [ -z ${DATABASE_URL+x} ]; then
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
fi
postgres_ready() {
python << END