# Stage 1: build static HTML from Markdown FROM golang:1.22-alpine AS builder WORKDIR /build COPY go.mod go.sum ./ RUN go mod download COPY . . RUN go run ./cmd/build # Stage 2: serve with nginx FROM nginx:alpine COPY --from=builder /build/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]