fix: add explicit ARG/ENV VITE_API_URL to Dockerfile
Without this, Vite sees VITE_API_URL as undefined (not empty string) at build time. The ?? operator only replaces null/undefined, not a missing var, so better-auth receives undefined — which it treats as a relative path and prepends window.location.origin at build time, resulting in the UAT URL being baked in. Explicitly setting ARG VITE_API_URL= (empty string) in the Dockerfile makes Vite see it as defined with empty value, so the || fallback fires at runtime. Fixes GRO-1280.
This commit is contained in:
@@ -11,6 +11,8 @@ RUN pnpm install --frozen-lockfile
|
|||||||
|
|
||||||
# Build
|
# Build
|
||||||
FROM deps AS builder
|
FROM deps AS builder
|
||||||
|
ARG VITE_API_URL=
|
||||||
|
ENV VITE_API_URL=
|
||||||
COPY packages/types/ packages/types/
|
COPY packages/types/ packages/types/
|
||||||
COPY apps/web/ apps/web/
|
COPY apps/web/ apps/web/
|
||||||
RUN pnpm --filter @groombook/web build
|
RUN pnpm --filter @groombook/web build
|
||||||
|
|||||||
Reference in New Issue
Block a user