From fb028086663602c07f149174c18dd112e0ed7e35 Mon Sep 17 00:00:00 2001 From: river Date: Sun, 15 Mar 2026 12:57:21 +0000 Subject: [PATCH] fix: set ARG before COPY for VITE_API_BASE to work in build --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 665742e..90fcc6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,14 @@ FROM node:20-alpine AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm install -COPY . . + +# Set build args and env vars BEFORE copying source code ARG VITE_WIZARD_PORT=18080 ARG VITE_API_BASE ENV VITE_WIZARD_PORT=$VITE_WIZARD_PORT ENV VITE_API_BASE=$VITE_API_BASE + +COPY . . RUN npm run build # Production stage — lightweight static server, no nginx