Prefer secret to env variable if both are configured
This commit is contained in:
parent
df3ab69c0f
commit
6bada6660a
3 changed files with 19 additions and 23 deletions
|
@ -31,19 +31,15 @@ else
|
|||
if [ -z ${SUPERUSER_EMAIL+x} ]; then
|
||||
SUPERUSER_EMAIL='admin@example.com'
|
||||
fi
|
||||
if [ -z ${SUPERUSER_PASSWORD+x} ]; then
|
||||
if [ -f "/run/secrets/superuser_password" ]; then
|
||||
SUPERUSER_PASSWORD="$(< /run/secrets/superuser_password)"
|
||||
else
|
||||
SUPERUSER_PASSWORD='admin'
|
||||
fi
|
||||
if [ -f "/run/secrets/superuser_password" ]; then
|
||||
SUPERUSER_PASSWORD="$(< /run/secrets/superuser_password)"
|
||||
elif [ -z ${SUPERUSER_PASSWORD+x} ]; then
|
||||
SUPERUSER_PASSWORD='admin'
|
||||
fi
|
||||
if [ -z ${SUPERUSER_API_TOKEN+x} ]; then
|
||||
if [ -f "/run/secrets/superuser_api_token" ]; then
|
||||
SUPERUSER_API_TOKEN="$(< /run/secrets/superuser_api_token)"
|
||||
else
|
||||
SUPERUSER_API_TOKEN='0123456789abcdef0123456789abcdef01234567'
|
||||
fi
|
||||
if [ -f "/run/secrets/superuser_api_token" ]; then
|
||||
SUPERUSER_API_TOKEN="$(< /run/secrets/superuser_api_token)"
|
||||
elif [ -z ${SUPERUSER_API_TOKEN+x} ]; then
|
||||
SUPERUSER_API_TOKEN='0123456789abcdef0123456789abcdef01234567'
|
||||
fi
|
||||
|
||||
./manage.py shell --interface python << END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue