From fadd1aa24d6f4560171c2d520f5f1216aa8dcb3b Mon Sep 17 00:00:00 2001 From: xrendan Date: Tue, 2 Jun 2026 09:48:29 -0600 Subject: [PATCH] docker: forward NEXT_PUBLIC_POSTHOG_TOKEN into the build stage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker silently drops --build-arg values without a matching ARG declaration, so the PostHog token never reached next build and was never inlined into the client bundles — posthog.init() guard stayed undefined in prod. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5b2de63..82ff514 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,10 @@ ENV NEXT_TELEMETRY_DISABLED=1 # fetches during static generation hit the correct API host. ARG TRACKER_API_BASE ARG NEXT_PUBLIC_SITE_URL +ARG NEXT_PUBLIC_POSTHOG_TOKEN ENV TRACKER_API_BASE=$TRACKER_API_BASE ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL +ENV NEXT_PUBLIC_POSTHOG_TOKEN=$NEXT_PUBLIC_POSTHOG_TOKEN RUN pnpm run build