Point API base at platform.loyaly.ai
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 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,13 @@ ENV NODE_ENV=production
|
|||||||
# that matters on a 1-vCPU host) and 116 MB off this layer.
|
# that matters on a 1-vCPU host) and 116 MB off this layer.
|
||||||
ENV CI_BUILD=1
|
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
|
RUN npm run build
|
||||||
|
|
||||||
# Stage 3: Production runner with Next.js Standalone
|
# Stage 3: Production runner with Next.js Standalone
|
||||||
|
|||||||
Reference in New Issue
Block a user