DAM-static-site/Dockerfile
peskyadmin 7e4af7480b
Some checks are pending
Deploy Hugo site to Pages / build (push) Waiting to run
Deploy Hugo site to Pages / deploy (push) Blocked by required conditions
docker deployment
2025-03-25 21:56:31 -04:00

21 lines
456 B
Docker

# Stage 1: Build the Hugo site
FROM hugomods/hugo:exts-0.145.0 AS builder
WORKDIR /src
COPY . /src
RUN npm install --prefix /src
# Fetch modules (if using Hugo modules) and build the site
RUN hugo mod get -u && hugo --minify
# Stage 2: Serve with Nginx
FROM nginx:alpine
# Copy the built site from the builder stage
COPY --from=builder /src/public /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Default Nginx command is fine, no need to override