mirror of
https://github.com/kogakure/website-11ty-kogakure.de.git
synced 2026-02-03 20:25:30 +00:00
25 lines
397 B
Docker
25 lines
397 B
Docker
# Stage 1: Build the application
|
|
FROM node:lts AS builder
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json pnpm-*.yaml ./
|
|
|
|
RUN pnpm install
|
|
|
|
COPY . .
|
|
|
|
RUN pnpm run build
|
|
|
|
# Stage 2: Serve the application using Nginx
|
|
FROM nginx:stable-alpine
|
|
|
|
# Copy build artifacts from the builder stage
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|