0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-24 20:34:10 +02:00

Implement docker secret handling for SMTP_PASSWORD (#1471)

* Implement docker secret handling for SMTP_PASSWORD

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Use `trim` instead of `rtrim` for `SMTP_PASSWORD_FILE` contents

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Signed-off-by: András Maróy <andras@maroy.hu>

* Runs update.sh

Co-authored-by: GitHub Workflow <workflow@github.com>
This commit is contained in:
András Maróy 2021-07-30 12:23:35 +00:00 committed by GitHub
parent 188db02474
commit 5d01cebeab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 81 additions and 11 deletions

View file

@ -8,8 +8,15 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN'))
'mail_smtpauth' => getenv('SMTP_NAME') && getenv('SMTP_PASSWORD'),
'mail_smtpauthtype' => getenv('SMTP_AUTHTYPE') ?: 'LOGIN',
'mail_smtpname' => getenv('SMTP_NAME') ?: '',
'mail_smtppassword' => getenv('SMTP_PASSWORD') ?: '',
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
if (getenv('SMTP_PASSWORD_FILE') && file_exists(getenv('SMTP_PASSWORD_FILE'))) {
$CONFIG['mail_smtppassword'] = trim(file_get_contents(getenv('SMTP_PASSWORD_FILE')));
} elseif (getenv('SMTP_PASSWORD')) {
$CONFIG['mail_smtppassword'] = getenv('SMTP_PASSWORD');
} else {
$CONFIG['mail_smtppassword'] = '';
}
}