Pass VITE_API_URL as build arg

This commit is contained in:
2026-04-24 19:13:47 -03:00
parent e35f67ba6f
commit 1fc2c0fcc1
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -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