fix(deploy): map DATABASE_URL_APP into the base compose api service#2526
Merged
Conversation
v0.95.0 makes DATABASE_URL_APP the preferred way to point the request pool at the unprivileged app role, and the only option for multi-host/HA URLs (requestDatabaseConfig throws rather than derive one). The base compose file never mapped it, so a value set in .env was silently dropped — the same failure mode #2522 fixed for deploy/docker-compose.prod.yml, which already carries a comment explaining why all three must be mapped. Verified with `docker compose config`: before, a DATABASE_URL_APP set in the env file produced 0 occurrences in the rendered api service; after, the value reaches the api service intact, including comma-separated HA hosts. Unset still renders as "" and leaves the config valid. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying breeze with
|
| Latest commit: |
1c98c11
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c810ff35.breeze-9te.pages.dev |
| Branch Preview URL: | https://fix-base-compose-database-ur.breeze-9te.pages.dev |
requestDatabaseCompose.test.ts asserted DATABASE_URL_APP was ABSENT from the base compose api env — the shape this PR deliberately changes. Update it to the new contract: the var is now mapped as an empty string when unset, and the resolver still derives (resolveRequestDatabaseConfig trims + truthiness- checks, so blank == not set — verified the empty mapping does not shadow derivation). Adds a case proving an explicitly-set DATABASE_URL_APP flows through to the api service, which is the capability the mapping restores. Runs green locally on Node 22.20.0 (3/3). Co-Authored-By: Claude Opus 4.8 (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.
Problem
v0.95.0 makes
DATABASE_URL_APPthe preferred way to point the request pool at the unprivilegedbreeze_approle, and the only option for multi-host/HA URLs —requestDatabaseConfig.tsthrows rather than derive one:The base
docker-compose.ymlnever mapped it into theapiserviceenvironment:block. Compose only interpolates vars listed there, so a self-hoster settingDATABASE_URL_APPin.envhad it silently dropped.This is the same failure mode #2522 fixed for
deploy/docker-compose.prod.yml— which already carries a comment spelling out why all three must be mapped, while the base file it mirrors omitted one of them.Fix
Map
DATABASE_URL_APP: ${DATABASE_URL_APP:-}alongside the existingPOSTGRES_PASSWORD/BREEZE_APP_DB_PASSWORD.Verification
docker compose configagainst an env file, base compose:DATABASE_URL_APPoccurrences in renderedapi"", config still valid (rc=0)Confirmed via
awkthat the var lands in theapiservice specifically.Why now
Blocks cutting v0.95.0 — this is the release that introduces the variable, so shipping it inert on the default compose file would strand base-compose HA users on the exact footgun the release is meant to close.
🤖 Generated with Claude Code