Let a local build reach the catalogue it already has the key for

Fixkamo-marketing
Shipped
September 7, 2026 at 8:15 PM UTC
Author
Kamo
Commit
18caf10

`npm run build` on a laptop died prerendering /en/alternatives/gohighlevel with "Kamo seat prices unavailable", and `npm run dev` served a homepage with no prices on it. Both are true statements about prices and neither says the cause is an absent PUBLIC_CHAT_API_KEY or where to find one — so the documented commands in the README did not work as documented, and the only way past it was to already know. The key has exactly one definition and it is committed to this repository: k8s/configmap.yaml, the same file that hands it to the running pod and the same file CI greps to build the image. Neither of those paths changes — both arrive with it already in the environment, and next.config now returns on its first line for them. What had no path to that one definition at all was a developer with the repo checked out, so next.config reads it. A fallback for the KEY, not for the prices. A page that still cannot reach the catalogue with a key in hand throws exactly as it did before: the standing rule is that the system is all the same system, so when it is down everything is down, and nothing here substitutes a number. The ~530 lines of hardcoded catalogue deleted in c9953bf stay deleted. Set into process.env rather than through next.config's `env` option, which would INLINE the value into the compiled output — freezing whatever the build machine read and making the pod's own configmap unreadable to it, so the value would survive a rotation the configmap had already moved past. Next loads the config in the parent process before forking the workers that prerender, and a forked child inherits process.env, so the assignment reaches all seven of them while staying an ordinary runtime lookup. The CI workflow keeps its own extraction step. It is not redundant: it fails in seconds with a clear message instead of eight minutes into a Docker build. Verified all three environments: · no key in the environment — the config logs that it read the configmap, 191 pages generate, and the built /en/alternatives/gohighlevel carries $69 and $119, the live catalogue's numbers, not blanks. · key in the environment — zero [catalog-key] lines, build green, which is the CI and Docker path untouched. · next dev with no key — /en and /en/pricing render 49/59/69, 99/109/119 and the $99 setup fee, with no 401 anywhere in the log.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing