Merge pull request #584 from lightswitch05/feature/support-docker-secrets-for-web-password
Support docker secrets for web password
This commit is contained in:
commit
e6a9cd5ce2
|
@ -290,6 +290,14 @@ setup_web_port() {
|
|||
|
||||
}
|
||||
|
||||
load_web_password_secret() {
|
||||
# If WEBPASSWORD is not set at all, attempt to read password from WEBPASSWORD_FILE,
|
||||
# allowing secrets to be passed via docker secrets
|
||||
if [ -z "${WEBPASSWORD+x}" ] && [ -n "${WEBPASSWORD_FILE}" ] && [ -r "${WEBPASSWORD_FILE}" ]; then
|
||||
WEBPASSWORD=$(<"${WEBPASSWORD_FILE}")
|
||||
fi;
|
||||
}
|
||||
|
||||
generate_password() {
|
||||
if [ -z "${WEBPASSWORD+x}" ] ; then
|
||||
# Not set at all, give the user a random pass
|
||||
|
|
Loading…
Reference in New Issue