This commit is contained in:
2026-08-27 17:48:20 +05:30
parent 0a3e6302b9
commit bf4dc4e888
2 changed files with 37 additions and 6 deletions

View File

@@ -19,6 +19,20 @@ COPY package*.json ./
RUN npm ci --no-audit --no-fund
COPY . .
# Where the bundle points at the backend, fixed HERE rather than left to `.env`.
#
# Deployment platforms write their own `.env` into the source directory before
# building — Dokploy does — which overwrites the committed one and takes
# VITE_API_BASE with it. The build then fell through to a same-origin path and
# the console called `https://<its own domain>/fiesta/live/api/...`. A build
# argument outranks the file, so the host survives that overwrite.
#
# Override per environment with `--build-arg VITE_API_BASE=...` (Dokploy: Build
# Args), e.g. to point a staging console at a staging Fiesta.
ARG VITE_API_BASE="https://fiesta.nearle.app"
ENV VITE_API_BASE=$VITE_API_BASE
RUN npm run build
# Stage 2 — serve