fix(build): per-commit cache-bust so web-only changes actually deploy

Auto-deploys (docker build with cache) were reusing a stale build layer, so
web-only commits shipped an old bundle — the switcher removal (#216) and the
canonical fix (#217) only appeared after a manual --no-cache/force rebuild.
Reference SOURCE_COMMIT (substituted by Coolify) right before `COPY . .`, so the
build layer's cache key changes every commit and COPY + `pnpm build` re-run. The
deps stage stays cached on the lockfile, so installs aren't repeated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 07:43:05 +03:00
parent 2bf7525fe2
commit c20fc5462a
2 changed files with 11 additions and 0 deletions

View File

@@ -15,6 +15,9 @@ services:
- VITE_SENTRY_DSN=${VITE_SENTRY_DSN:-}
- VITE_SENTRY_ENVIRONMENT=${VITE_SENTRY_ENVIRONMENT:-production}
- VITE_SENTRY_RELEASE=${VITE_SENTRY_RELEASE:-}
# Per-commit cache-bust (see Dockerfile) — Coolify substitutes the SHA so
# every commit rebuilds the bundle instead of reusing a stale cached layer.
- SOURCE_COMMIT=${SOURCE_COMMIT:-unknown}
- VITE_GOOGLE_ADS_ID=${VITE_GOOGLE_ADS_ID:-}
- VITE_GOOGLE_ADS_SIGNUP_LABEL=${VITE_GOOGLE_ADS_SIGNUP_LABEL:-}
environment: