From 7360a53344f256a4a0ba7a2e5af0bab1e6367119 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 21 Jun 2026 21:44:11 +0200 Subject: [PATCH] Default the Docker footer branch to main 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. --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 54e75a6..972567e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,11 @@ WORKDIR /app # Build-time git metadata for the footer. The build context excludes # `.git` (see .dockerignore), so `build.rs` can't shell out to git here. -# The deploy passes these as build args instead; Coolify auto-injects -# `SOURCE_COMMIT`. Set GIT_BRANCH as a build arg in Coolify (e.g. `main`). -ARG GIT_BRANCH=unknown +# Production only ever deploys `main`, so default the branch to `main` +# (override with `--build-arg GIT_BRANCH=...` for a one-off branch build). +# The commit comes from Coolify's auto-injected `SOURCE_COMMIT`; set +# `GIT_HASH` explicitly to override it. +ARG GIT_BRANCH=main ARG GIT_HASH= ARG SOURCE_COMMIT= ENV GIT_BRANCH=${GIT_BRANCH} \