mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 14:28:41 +01:00
This was masking the Phase E Hetzner cutover for hours. .vercelignore was slimmer than it needed to be, so `vercel --prod --yes` was uploading the working directory's .env.production.local file. Next.js loads that at runtime with higher priority than platform env vars set via `vercel env add`, so every API call kept hitting Neon despite the platform env showing the new Hetzner DSN. Two patterns to internalize: 1. Local env override files (.env.*.local) MUST be in .vercelignore. .gitignore alone isn't enough because the Vercel CLI uploads from local context, not from git. 2. Patterns without a leading `/` match anywhere in the tree. `desktop` would wrongly exclude src/components/desktop/ (real source code). Root-level exclusions must be anchored with `/desktop`, `/bridge` etc. Diagnosis details + future-proofing pattern saved to memory/pattern_vercel_cli_env_local_override.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
# Vercel CLI uploads the working directory and respects .vercelignore.
|
|
# .gitignore is NOT respected during `vercel deploy` from a local dir,
|
|
# so files like .env.production.local — which contain LOCAL-DEV-ONLY
|
|
# overrides of production env vars — would otherwise bake the wrong
|
|
# DATABASE_URL into the deployed bundle. We surfaced this 2026-06-04
|
|
# when a Hetzner-targeted deploy was silently hitting Neon at runtime.
|
|
#
|
|
# IMPORTANT: patterns without leading `/` match anywhere in the tree.
|
|
# Use `/dirname` to anchor to repo root and avoid masking
|
|
# src/components/<dirname>/ source code with the same name.
|
|
|
|
# ── Local-only env files (would override platform env at runtime) ────
|
|
.env.local
|
|
.env.development.local
|
|
.env.production.local
|
|
.env.hetzner.local
|
|
.env.test.local
|
|
|
|
# ── Heavy root-level subprojects (NOT to be confused with same-named
|
|
# directories under src/) ─────────────────────────────────────────
|
|
/desktop
|
|
/squashfs-root
|
|
/bridge
|
|
/home
|
|
/infra
|
|
|
|
# ── Build caches + extracted node_modules ────────────────────────────
|
|
node_modules
|
|
.next
|
|
.next-cache
|
|
|
|
# ── Local toolchains / vendored deps ─────────────────────────────────
|
|
.local-toolchain
|
|
.python-vendor
|
|
|
|
# ── Claude / dev tooling state ───────────────────────────────────────
|
|
.claude
|
|
.playwright-mcp
|
|
|
|
# ── Backup dumps + screenshots ───────────────────────────────────────
|
|
/backups
|
|
*.png
|
|
*.jpeg
|
|
*.jpg
|
|
|
|
# ── OS / editor noise ────────────────────────────────────────────────
|
|
.DS_Store
|
|
.idea
|
|
.vscode
|
|
*.swp
|