12 lines
341 B
Docker
12 lines
341 B
Docker
# Stage 1: Build the static site using Hugo
|
|
FROM hugomods/hugo:latest AS builder
|
|
WORKDIR /src
|
|
COPY . .
|
|
# Run hugo build to compile markdown into static HTML/CSS/JS in the public/ folder
|
|
RUN hugo --minify
|
|
|
|
# Stage 2: Serve the compiled static site using Nginx
|
|
FROM nginx:alpine
|
|
COPY --from=builder /src/public /usr/share/nginx/html
|
|
EXPOSE 80
|