fix(smtp): inject SMTP password secret via entrypoint, not *_FILE

The official discourse/discourse image has no *_FILE support, so
DISCOURSE_SMTP_PASSWORD_FILE was silently ignored and SMTP auth booted
without a password. Read the secret in the wrapper entrypoint and export
DISCOURSE_SMTP_PASSWORD, mirroring the DB password handling. Bump
APP_ENTRYPOINT_VERSION so the new entrypoint config redeploys.

Add release notes for the bitnami->official SMTP env var renames.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-18 21:50:12 +00:00
co-authored by Claude Opus 4.8
parent d65c163c57
commit 25e191dfd2
4 changed files with 22 additions and 5 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
export DB_ENTRYPOINT_VERSION=v3
export PG_BACKUP_VERSION=v2
export APP_ENTRYPOINT_VERSION=v1
export APP_ENTRYPOINT_VERSION=v2
export APP_INSTALL_SSL_VERSION=v1
export APP_MIGRATE_UPLOADS_VERSION=v1
+6 -2
View File
@@ -1,11 +1,15 @@
#!/bin/bash
# Co-op Cloud wrapper around the official image's /sbin/boot.
# discourse/discourse reads DISCOURSE_DB_PASSWORD from the process env (pups/Ruby;
# it has no *_FILE support), so inject it from the docker secret before booting.
# discourse/discourse reads passwords from the process env (pups/Ruby; it has no
# *_FILE support), so inject them from the docker secrets before booting.
set -e
if [ -f /run/secrets/db_password ]; then
export DISCOURSE_DB_PASSWORD="$(cat /run/secrets/db_password)"
fi
if [ -f /run/secrets/smtp_password ]; then
export DISCOURSE_SMTP_PASSWORD="$(cat /run/secrets/smtp_password)"
fi
exec /sbin/boot
+2 -2
View File
@@ -3,8 +3,8 @@ version: "3.8"
services:
app:
environment:
- DISCOURSE_SMTP_PASSWORD_FILE=/var/run/secrets/smtp_password
# the wrapper entrypoint reads /run/secrets/smtp_password and exports
# DISCOURSE_SMTP_PASSWORD (the official image has no *_FILE support)
secrets:
- smtp_password
+13
View File
@@ -0,0 +1,13 @@
This release switches from the bitnami image to the official discourse/discourse
image. Some env vars need to be renamed for this migration; everything else
should happen automatically.
Rename these in your app's .env (the values carry over):
DISCOURSE_SMTP_HOST --> DISCOURSE_SMTP_ADDRESS
DISCOURSE_SMTP_USER --> DISCOURSE_SMTP_USER_NAME
DISCOURSE_SMTP_AUTH --> DISCOURSE_SMTP_AUTHENTICATION
DISCOURSE_SMTP_PROTOCOL --> DISCOURSE_SMTP_ENABLE_START_TLS
Note: DISCOURSE_SMTP_ENABLE_START_TLS takes a boolean (true/false), not the old
tls/ssl value, so translate it rather than copying it straight across.