mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-14 08:54:52 +03:00
feat: add the possibility to override the DATABASE_URL by setting it in the environment
This commit is contained in:
parent
3b4d6857f0
commit
2ede8e0479
|
@ -14,7 +14,10 @@ if [ -z "${POSTGRES_USER}" ]; then
|
||||||
base_postgres_image_default_user='postgres'
|
base_postgres_image_default_user='postgres'
|
||||||
export POSTGRES_USER="${base_postgres_image_default_user}"
|
export POSTGRES_USER="${base_postgres_image_default_user}"
|
||||||
fi
|
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() {
|
postgres_ready() {
|
||||||
python << END
|
python << END
|
||||||
|
|
Loading…
Reference in New Issue
Block a user