Add support for API key at build time in Dockerfile for Vite
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user