fix(deploynotify): read commit SHA from Coolify SOURCE_COMMIT runtime env

Baking SOURCE_COMMIT as a Docker build arg never worked: Coolify exposes it
as a runtime env var, not a build arg, so gitSHA was always empty and the owner
DM was skipped. Read SOURCE_COMMIT from the container env at startup (falling
back to the ldflags-baked gitSHA for local builds), forward it via the compose
environment, and drop the dead build-arg baking.
This commit is contained in:
tiennm99 committed 2026-06-28 23:08:17 +07:00
1 parent 1fa549fa18
commit 0abd33cb42
6 files changed
+55 -22

No files matched your search

+3 -2
View File
@@ -23,8 +23,9 @@ ADMIN_IDS=
# Only the twentyq module needs this. Leave blank to disable that command.
GEMINI_API_KEY=
# SOURCE_COMMIT is injected as a build arg by Coolify (it sets it automatically)
# for the deploynotify owner DM. Leave unset for local `docker compose up` —
# SOURCE_COMMIT is injected into the container at runtime by Coolify (a
# predefined env var holding the commit SHA); read at startup for the
# deploynotify owner DM. Leave unset for local `docker compose up` —
# deploynotify just stays silent.
# SOURCE_COMMIT=