Allow preset env variable for django secret

The source command fails if /run/secrets/django does not exist. This is however not important if DJANGO_SECRET_KEY is already set. This is checked in the next step
This commit is contained in:
Danilo Bürger 2021-01-22 21:08:34 +01:00
parent 7e67e0db12
commit 11d7f7b888
No known key found for this signature in database
GPG Key ID: A77AAF866C46473D
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
set -e
# Set DJANGO_SECRET_KEY variable
source /run/secrets/django
source /run/secrets/django || true
[[ -n "$DJANGO_SECRET_KEY" ]] || {
echo "ERROR: Django secret key undefined! Cannot continue."
sleep 5

View File

@ -16,7 +16,7 @@ EOF
}
# Set DJANGO_SECRET_KEY variable
source /run/secrets/django
source /run/secrets/django || true
[[ -n "$DJANGO_SECRET_KEY" ]] || {
echo "ERROR: Django secret key undefined! Cannot continue."
sleep 5