fix(web): an empty PUBLIC_URL falls back to https://logicsrc.com (#220)

The dev2 image build declares PUBLIC_URL as a Dockerfile ARG, so the
app.logicsrc.com service (which builds this workspace too, from the same
root Dockerfile) sees PUBLIC_URL="" rather than unset. `??` keeps the
empty string and `new URL("")` in layout.tsx failed the build at
"Collecting page data" (run 36161007683). `||` treats empty as absent.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-09-25 09:39:33 -07:00 • committed by GitHub
parent 4ac750e65b
commit 21e533ce16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,10 @@ import { allSpecs } from "./specs";
* content), and all three always emit openGraph and twitter titles. * content), and all three always emit openGraph and twitter titles.
*/ */
export const SITE_URL = (process.env.PUBLIC_URL ?? "https://logicsrc.com").replace(/\/$/, ""); // `||`, not `??`: the dev2 image build declares PUBLIC_URL as an ARG, so a service
// that never sets it (app.logicsrc.com builds this workspace too) sees "" and
// `new URL("")` in layout.tsx failed the whole build.
export const SITE_URL = (process.env.PUBLIC_URL || "https://logicsrc.com").replace(/\/$/, "");
export const SITE_NAME = "LogicSRC"; export const SITE_NAME = "LogicSRC";
/** /**