devblog/Dockerfile

18 lines
405 B
Text
Raw Permalink Normal View History

2024-12-25 02:14:10 -05:00
# Base stage for building the static files
FROM node:lts AS base
WORKDIR /app
2025-03-08 19:45:21 -05:00
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
2024-12-25 02:14:10 -05:00
COPY . .
2025-03-08 19:45:21 -05:00
RUN pnpm run build
2024-12-25 02:14:10 -05:00
# Runtime stage for serving the application
FROM nginx:mainline-alpine-slim AS runtime
2025-03-08 19:45:21 -05:00
COPY --from=base /app/dist /usr/share/nginx/html
EXPOSE 80