diff --git a/docker-compose.yml b/docker-compose.yml index d7895d7..411063d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,9 +7,10 @@ services: apply: condition: service_started environment: - # Coolify injects SOURCE_COMMIT at runtime on every deploy; settings.py - # reads GIT_COMMIT and renders it in the footer. - - GIT_COMMIT=${SOURCE_COMMIT:-dev} + # SOURCE_COMMIT is auto-injected by Coolify at runtime; settings.py + # reads it and renders it in the footer. Don't reference it here — + # Coolify treats any ${SOURCE_COMMIT} in the compose as a user env + # var and stops injecting the real SHA. - AUTH_USERNAME=${AUTH_USERNAME} - AUTH_PASSWORD_HASH=${AUTH_PASSWORD_HASH} - SESSION_SECRET=${SESSION_SECRET} diff --git a/web/settings.py b/web/settings.py index dfed3e9..7e8a09d 100644 --- a/web/settings.py +++ b/web/settings.py @@ -62,6 +62,6 @@ ANTHROPIC_MODEL: str = getenv("ANTHROPIC_MODEL", "claude-haiku-4-5-20251001") # --- Build info -------------------------------------------------------------- # Coolify injects SOURCE_COMMIT into the container's runtime env on every -# deploy; docker-compose.yml maps it to GIT_COMMIT. Rendered in the site -# footer so the running commit is visible at a glance. -GIT_COMMIT: str = getenv("GIT_COMMIT", "").strip() or "dev" +# deploy. GIT_COMMIT is the local-dev override. Rendered in the footer so +# the running commit is visible at a glance. +GIT_COMMIT: str = (getenv("GIT_COMMIT") or getenv("SOURCE_COMMIT") or "").strip() or "dev"