docker: Add support for SMTP password file (#240)

Similar to LLDAP_JWT_SECRET and LLDAP_LDAP_USER_PASS, add option to use an
ENV variable to specify the file of the SMTP password:
LLDAP_SMTP_OPTIONS__PASSWORD_FILE
This commit is contained in:
Jacob Yundt 2022-07-13 04:52:40 -04:00 committed by GitHub
parent 479d1e7635
commit 2c2696a8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
for SECRET in LLDAP_JWT_SECRET LLDAP_LDAP_USER_PASS; do for SECRET in LLDAP_JWT_SECRET LLDAP_LDAP_USER_PASS LLDAP_SMTP_OPTIONS__PASSWORD; do
FILE_VAR="${SECRET}_FILE" FILE_VAR="${SECRET}_FILE"
SECRET_FILE="${!FILE_VAR:-}" SECRET_FILE="${!FILE_VAR:-}"
if [[ -n "$SECRET_FILE" ]]; then if [[ -n "$SECRET_FILE" ]]; then