19 lines
460 B
Docker
19 lines
460 B
Docker
FROM node:22-slim AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
# Clone Quartz and install deps
|
|
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
RUN git clone --depth 1 https://github.com/jackyzha0/quartz.git . && npm ci
|
|
|
|
# Copy content
|
|
COPY content/ /usr/src/app/content/
|
|
|
|
# Build static site
|
|
RUN npx quartz build
|
|
|
|
# --- Serve with lightweight nginx ---
|
|
FROM nginx:alpine
|
|
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
|
|
EXPOSE 80
|