26 lines
460 B
Docker
26 lines
460 B
Docker
# ©AngelaMos | 2026
|
|
# vite.docker
|
|
|
|
FROM node:24-alpine AS build
|
|
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package.json frontend/pnpm-lock.yaml* ./
|
|
|
|
RUN pnpm install --frozen-lockfile || pnpm install
|
|
|
|
COPY frontend/ .
|
|
|
|
RUN pnpm build
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY conf/nginx/prod.nginx /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|