From f3c58df3c6165541cf6d84f25045717aa0b51dce Mon Sep 17 00:00:00 2001 From: p4u1 Date: Fri, 27 Mar 2026 18:25:06 +0100 Subject: [PATCH] feat: add mail_password --- .env.sample | 8 +++++--- abra.sh | 2 +- compose.mail.yml | 11 +++++++++++ entrypoint.sh.tmpl | 7 ++++++- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 compose.mail.yml diff --git a/.env.sample b/.env.sample index a6c9316..9d740a1 100644 --- a/.env.sample +++ b/.env.sample @@ -39,8 +39,6 @@ DOMAIN=bonfire.example.com # enable abra backups ENABLE_BACKUPS=true -# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets.env -MAIL_BACKEND=none # uncomment in order to NOT automatically change the database schema when you upgrade the app # DISABLE_DB_AUTOMIGRATION=true @@ -64,6 +62,11 @@ LOG_LEVEL=info # and do not check your env file into any public git repo # change ALL the values: +# what service to use for sending out emails (eg. smtp, mailgun, none) NOTE: you should also set the corresponding keys in secrets.env +MAIL_BACKEND=none + +#COMPOSE_FILE="$COMPOSE_FILE:compose.mail.yml" +#SECRET_MAIL_PASSWORD_VERSION=v1 # signup to an email service and edit with relevant info, see: https://docs.bonfirenetworks.org/Bonfire.Mailer.html # MAIL_DOMAIN=mgo.example.com @@ -76,7 +79,6 @@ LOG_LEVEL=info # MAIL_SESSION_TOKEN= # MAIL_SERVER= # MAIL_USER= -# MAIL_PASSWORD= # MAIL_PORT= # MAIL_SSL=true # MAIL_TLS=if_available diff --git a/abra.sh b/abra.sh index 105dfc3..5e31be1 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export APP_ENTRYPOINT_VERSION=v1 +export APP_ENTRYPOINT_VERSION=v2 export PG_BACKUP_VERSION=v4 export MEILI_BACKUP_VERSION=v4 diff --git a/compose.mail.yml b/compose.mail.yml new file mode 100644 index 0000000..0dfc189 --- /dev/null +++ b/compose.mail.yml @@ -0,0 +1,11 @@ +version: "3.8" + +services: + app: + secrets: + - mail_password + +secrets: + mail_password: + external: true + name: ${STACK_NAME}_mail_password_${SECRET_MAIL_PASSWORD_VERSION} diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index ea186ac..19fe206 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -9,7 +9,12 @@ export ENCRYPTION_SALT=$(cat /run/secrets/encryption_salt) export SEEDS_PW=$(cat /run/secrets/seeds_pw) export LIVEBOOK_PASSWORD=$(cat /run/secrets/livebook_password) +# Only read the secret when the MAIL_PASSWORD was not set to remain backwards compatible +if [[ -z ${MAIL_PASSWORD} ]]; then + export MAIL_PASSWORD=$(cat /run/secrets/mail_password) +fi + echo "....Secrets have been loaded, now run $@...." # This will exec the CMD from your Dockerfile -exec "$@" \ No newline at end of file +exec "$@" -- 2.49.0