Bake main as the default footer branch in Docker#33
Merged
Merged
Conversation
Production only deploys main, so default ARG GIT_BRANCH=main. The image now bakes the branch with no Coolify config (overridable per-branch via --build-arg). Verified in a real docker build that the branch and the shortened SOURCE_COMMIT land in the server binary.
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.
Follow-up to the footer wiring. The previous version left GIT_BRANCH defaulting to "unknown" in the image unless you set a Coolify build arg.
Since prod only ever deploys main, this just defaults
ARG GIT_BRANCH=mainin the Dockerfile, so the branch is baked into every image with no Coolify config. It's still overridable with--build-arg GIT_BRANCH=...for a one-off branch build. The commit hash continues to come from Coolify's auto-injectedSOURCE_COMMIT(no config needed).Verified in a real docker build: passing
--build-arg GIT_BRANCH=dockerbranchtest --build-arg SOURCE_COMMIT=deadbeefcafe1234bakesdockerbranchtestanddeadbeeinto the server binary, so the footer reads<branch> @ <hash>.