20 lines
359 B
Docker
20 lines
359 B
Docker
|
|
# Build stage
|
||
|
|
FROM node:20-alpine AS build
|
||
|
|
|
||
|
|
ARG VITE_API_BASE=/api/v1
|
||
|
|
ENV VITE_API_BASE=$VITE_API_BASE
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
COPY package.json ./
|
||
|
|
RUN npm install --no-audit --no-fund
|
||
|
|
COPY . .
|
||
|
|
RUN npm run build
|
||
|
|
|
||
|
|
# Runtime: nginx static
|
||
|
|
FROM nginx:1.27-alpine
|
||
|
|
|
||
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||
|
|
|
||
|
|
EXPOSE 80
|