[IMP] pass DB user from secret

The password stored in Docker Secret could be passed using the
`PASSWORD_FILE` environment variable. This PR allows to pass the user.
This commit is contained in:
Dmytro Lazariev 2023-04-20 12:40:32 +03:00
parent df8788b1e0
commit 1df9b67522
3 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,10 @@
set -e
if [ -v USER_FILE ]; then
USER="$(< $USER_FILE)"
fi
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi

View File

@ -2,6 +2,10 @@
set -e
if [ -v USER_FILE ]; then
USER="$(< $USER_FILE)"
fi
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi

View File

@ -2,6 +2,10 @@
set -e
if [ -v USER_FILE ]; then
USER="$(< $USER_FILE)"
fi
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi