mirror of
https://github.com/TheRealOwenRees/chess-scribe-website.git
synced 2026-07-23 01:46:57 +00:00
add VITE client vars to build
This commit is contained in:
+16
-1
@@ -1,6 +1,21 @@
|
||||
# --- Stage 1: Build Stage ---
|
||||
FROM node:24-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# 1. Declare the build-time arguments Vite needs
|
||||
ARG VITE_API_BASE_URL
|
||||
ARG VITE_MATOMO_URL
|
||||
ARG VITE_MATOMO_SITE_ID
|
||||
ARG VITE_MAINTENANCE_MODE
|
||||
ARG VITE_MAINTENANCE_MODE_MESSAGE
|
||||
|
||||
# 2. Assign them to environment variables so Vite detects them
|
||||
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
||||
ENV VITE_MATOMO_URL=$VITE_MATOMO_URL
|
||||
ENV VITE_MATOMO_SITE_ID=$VITE_MATOMO_SITE_ID
|
||||
ENV VITE_MAINTENANCE_MODE=$VITE_MAINTENANCE_MODE
|
||||
ENV VITE_MAINTENANCE_MODE_MESSAGE=$VITE_MAINTENANCE_MODE_MESSAGE
|
||||
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
RUN corepack enable pnpm && pnpm i --frozen-lockfile
|
||||
COPY . .
|
||||
@@ -20,4 +35,4 @@ COPY --from=builder /app/.output ./.output
|
||||
EXPOSE 3000
|
||||
|
||||
# Run the compiled Nitro server
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user