ci: fix vite env vars not passed when build
Some checks failed
Build and Publish Docker Image / build-and-push (push) Failing after 2m20s

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-25 01:53:13 +00:00
parent f7cc0c38a2
commit 1abfc44908
3 changed files with 22 additions and 0 deletions

View File

@@ -13,6 +13,17 @@ RUN bun install --frozen-lockfile
# Build dashboard stage
FROM base AS dashboard-builder
# Accept build arguments for Vite environment variables
ARG VITE_API_URL
ARG VITE_DEFAULT_LATITUDE
ARG VITE_DEFAULT_LONGITUDE
# Set as environment variables for Vite build
ENV VITE_API_URL=${VITE_API_URL}
ENV VITE_DEFAULT_LATITUDE=${VITE_DEFAULT_LATITUDE}
ENV VITE_DEFAULT_LONGITUDE=${VITE_DEFAULT_LONGITUDE}
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/apps/dashboard/node_modules ./apps/dashboard/node_modules
COPY apps/dashboard ./apps/dashboard