From 450fa0d6a073ecbde0510f12da8c4f9f15dd9726 Mon Sep 17 00:00:00 2001 From: Aravind Date: Thu, 6 Aug 2026 21:12:08 +0530 Subject: [PATCH] Point API base at platform.loyaly.ai MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set NEXT_PUBLIC_API_BASE in the builder stage so login and every other httpClient call target the platform backend instead of the local mock route handlers. Set in the Dockerfile rather than Dokploy because NEXT_PUBLIC_* is inlined into the client bundle at build time — a runtime env var has no effect. Origin only, since authRepository appends /api/auth/login. Co-Authored-By: Claude Opus 5 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8360781..e75648f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,13 @@ ENV NODE_ENV=production # that matters on a 1-vCPU host) and 116 MB off this layer. ENV CI_BUILD=1 +# Backend origin for httpClient.ts. Set here rather than in Dokploy because +# NEXT_PUBLIC_* is inlined into the client bundle at BUILD time — a runtime env +# var would have no effect. +# ORIGIN ONLY, no path: authRepository appends /api/auth/login itself, so the +# full endpoint here would request /api/auth/login/api/auth/login. +ENV NEXT_PUBLIC_API_BASE=https://platform.loyaly.ai + RUN npm run build # Stage 3: Production runner with Next.js Standalone