20 lines
386 B
Docker
20 lines
386 B
Docker
FROM node:20.19-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
ARG VITE_API_URL
|
|
ENV VITE_API_URL=$VITE_API_URL
|
|
|
|
COPY frontend/package.json frontend/package-lock.json /app/
|
|
RUN npm install
|
|
|
|
COPY frontend/ .
|
|
|
|
RUN npm run build
|
|
|
|
FROM nginx:latest
|
|
|
|
COPY --from=build /app/dist /srv/www/frontend
|
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/nginx/default.conf /etc/nginx/conf.d/default.conf |