Pass VITE_API_URL as build arg
This commit is contained in:
+3
-1
@@ -3,11 +3,13 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
ARG VITE_API_URL=/api
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN VITE_API_URL=$VITE_API_URL npm run build
|
||||
|
||||
# Stage 2: App only (no MariaDB)
|
||||
FROM node:20-alpine
|
||||
|
||||
Reference in New Issue
Block a user