Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can — learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company 👇

609 B
Raw Blame
# ©AngelaMos | 2026
# vite.docker

FROM node:22-alpine AS builder

RUN corepack enable && corepack prepare [email protected] --activate

WORKDIR /app

COPY frontend/package.json frontend/pnpm-lock.yaml* frontend/.npmrc* ./

RUN pnpm install --frozen-lockfile

COPY frontend/ .

RUN pnpm run build

FROM nginx:alpine

COPY --from=builder /app/dist /usr/share/nginx/html

COPY conf/nginx/prod.nginx /etc/nginx/nginx.conf

EXPOSE 80

HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD wget --quiet --tries=1 --spider http://localhost/health || exit 1

CMD ["nginx", "-g", "daemon off;"]