From abfd5e4cdd4dd578152f54a5d333dd92458e7f0b Mon Sep 17 00:00:00 2001 From: NEGM <96288489+neggmmm@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:47:33 +0300 Subject: [PATCH] feat: allow self-hosters to enable Stack Auth via Dockerfile build args (v33.0) (#445) * allow self-hosters to enable Stack Auth via Dockerfile build args * fix: drop unrelated whitespace churn from ui/Dockerfile Co-Authored-By: Claude Opus 4.8 (1M context) --------- Co-authored-by: NEGM Co-authored-by: Abhishek Kumar Co-authored-by: Claude Opus 4.8 (1M context) --- ui/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/Dockerfile b/ui/Dockerfile index 80dac3fb..e6ab02da 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -42,6 +42,15 @@ ENV NEXT_PUBLIC_CHATWOOT_URL="https://chat.dograh.com" ENV NEXT_PUBLIC_CHATWOOT_TOKEN="3fkFx2mCEjNHjM9gaNc4A82X" ENV BACKEND_URL="http://api:8000" +# Stack Auth (optional, for self-hosted social login). NEXT_PUBLIC_* values must +# be set at build time so Next.js inlines them into the browser bundle; setting +# them as runtime container env has no effect. Unset by default (empty strings), +# which leaves the official image on the built-in local auth flow. +ARG NEXT_PUBLIC_STACK_PROJECT_ID +ARG NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY +ENV NEXT_PUBLIC_STACK_PROJECT_ID=$NEXT_PUBLIC_STACK_PROJECT_ID +ENV NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=$NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY + # Build the application with standalone mode # Increase Node.js heap size to prevent out-of-memory errors during build ENV NODE_OPTIONS="--max-old-space-size=4096"