aurelie-portfolio/Dockerfile
ordinarthur ec064db204
Some checks failed
Build & Deploy to K3s / build-and-deploy (push) Failing after 11s
feat: add Dockerfile, nginx config and K8s manifests
2026-04-11 11:52:08 +02:00

26 lines
523 B
Docker

# --- Stage 1: Build ---
FROM node:22-alpine AS build
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Install dependencies first (cache layer)
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Copy source and build
COPY . .
RUN pnpm build
# --- Stage 2: Serve ---
FROM nginx:alpine AS runtime
# Custom nginx config
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Copy built static files
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80