From 21e533ce160084e9bbe4e646529b309e8e026bc7 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Fri, 25 Sep 2026 09:39:33 -0700 Subject: [PATCH] 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 --- apps/logicsrc-web/src/lib/page-meta.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/logicsrc-web/src/lib/page-meta.ts b/apps/logicsrc-web/src/lib/page-meta.ts index 9852dce..5b2b547 100644 --- a/apps/logicsrc-web/src/lib/page-meta.ts +++ b/apps/logicsrc-web/src/lib/page-meta.ts @@ -21,7 +21,10 @@ import { allSpecs } from "./specs"; * 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"; /**