Added Dockerfile & nginx configuration

This commit is contained in:
Jef Roosens 2022-03-29 16:01:16 +02:00
parent 0f614c6739
commit 928ad1422f
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 122 additions and 0 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM alpine:3.15.3 AS builder
RUN apk update && \
apk add --no-cache \
hugo
WORKDIR /app
COPY . ./
# Build the site
RUN hugo
FROM nginx:1.21.6-alpine
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/*.conf.template /etc/nginx/templates/
COPY --from=builder /app/public /usr/share/nginx/html