Add support for API key at build time in Dockerfile for Vite

This commit is contained in:
MayaTheShy
2026-03-22 02:15:13 -04:00
parent 0d3de9dc48
commit 5162a71be4

View File

@@ -9,6 +9,10 @@ RUN npm install
COPY . .
# Accept API key at build time so Vite can inline it
ARG VITE_API_KEY=""
ENV VITE_API_KEY=${VITE_API_KEY}
RUN npm run build
# Stage 2: Serve with nginx