25 lines
427 B
Docker
25 lines
427 B
Docker
FROM node:24-alpine AS build
|
|
WORKDIR /app
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
COPY . .
|
|
|
|
RUN pnpm install
|
|
|
|
ARG BASE=/
|
|
ARG VITE_API_URL=https://api.clipperia.com.br
|
|
ENV VITE_BASE_PATH=$BASE
|
|
ENV VITE_API_URL=$VITE_API_URL
|
|
RUN pnpm build
|
|
RUN rm -rf node_modules
|
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
RUN mkdir -p /var/cache/nginx /var/run/nginx
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|