Expose SMTP vars so they appear in Coolify's env-var UI#3
Merged
Conversation
Coolify's env-var scanner reads only \${...} substitutions in
compose.yml, not env_file contents. Upstream passes mail__* via
`env_file: - .env`, so users had to hand-create each row in the
Coolify UI before deploying.
patch.py now injects explicit `mail__transport: ${mail__transport:-SMTP}`
(and six sibling entries) into the ghost service's environment block.
Coolify surfaces them as pre-listed rows — users just fill in the
values instead of having to know the keys upfront.
Defaults: SMTP transport, port 465, secure=true. Host / auth / from
default to empty strings; Ghost boots without them, only mail-sending
flows fail until the user fills them in.
test-patch.sh asserts the three sentinel entries are present.
README.coolify.md deploy step 3 updated to reflect "fill in" vs "add
from scratch".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
patch.pynow injectsmail__transport,mail__options__host,mail__options__port,mail__options__secure,mail__options__auth__user,mail__options__auth__pass, andmail__frominto the ghost service'senvironment:block as explicit${mail__*:-default}refs.test-patch.shgets three sentinel assertions.Why
Coolify's env-var UI auto-populates from
${FOO}substitutions insidecompose.yml. Upstream hands mail settings to Ghost viaenv_file: - .env, which Coolify doesn't scan — so users deploying the stack had to manually create each SMTP row in the Coolify UI before the deploy would send email. Surfaced live when I deployed to my Coolify instance: no mail rows in the UI.The explicit
environment:entries win overenv_fileat Docker Compose precedence, so bare-metal users who populate.envviamigrate.share unaffected — Docker Compose reads the project.envfor substitution and the mail values propagate the same way.Defaults
mail__transportSMTPmail__options__port465mail__options__securetruemail__options__host/auth__user/auth__pass/mail__fromEmpty host/auth means Ghost boots but mail-sending flows (staff invites, password resets) fail until the user fills them in — not a regression over the prior behavior.
Test plan
bash .github/scripts/test-patch.shpasses — sentinel rows present, idempotency cleanshellcheck .github/scripts/test-patch.shclean🤖 Generated with Claude Code