fix(docker): isolate build database configuration - #490
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2129283760
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ENV NEXT_TELEMETRY_DISABLED=1 | ||
| RUN pnpm version:sync | ||
| RUN DATABASE_URL="${DATABASE_URL}" DATABASE_DIRECT_URL="${DATABASE_DIRECT_URL:-${DATABASE_URL}}" \ | ||
| RUN : "${BUILD_DATABASE_URL:?Set BUILD_DATABASE_URL to a migrated disposable database}" && \ |
There was a problem hiding this comment.
Consume the database URL as a BuildKit secret
When operators follow the new self-hosting instructions and enable Use Docker Build Secrets, BUILD_DATABASE_URL is supplied as a BuildKit secret rather than as this declared build argument. Docker requires secrets to be consumed by a RUN --mount=type=secret instruction (Docker build secrets); this RUN therefore sees an empty BUILD_DATABASE_URL and aborts every Coolify app build before pnpm build. Mount the secret into this instruction, or do not instruct operators to enable secret mode.
Useful? React with 👍 / 👎.
Description
Separate Docker build database configuration from the application's runtime database URLs. Prisma generation now requires
BUILD_DATABASE_URLfor a migrated disposable database, while the real Supabase URLs remain runtime-only in Coolify. Exclude backups from the Docker context and document the build/runtime configuration.Type of change
How Has This Been Tested?
212928376089863f095054a8c2e15a97050347f9.Checklist
Notes for reviewers
Coolify must have
BUILD_DATABASE_URLconfigured as build-only before deploying this commit. The staging and production build databases have been prepared separately. This PR changes no application API contracts or database schema; DNS cutover is a separate operation.Summary by cubic
Separates Docker build-time database configuration from runtime database URLs so build credentials no longer leak into image metadata.
BUILD_DATABASE_URL(and optionalBUILD_DATABASE_DIRECT_URL) pointing to a migrated, disposable database; the build fails if it's missing.Migration
BUILD_DATABASE_URLas a build-only variable before deploying this commit; prepare the staging and production build databases separately.Written for commit 2129283. Summary will update on new commits.