From fcb6bb33d942167e8283ee24d4b42785974bc67d Mon Sep 17 00:00:00 2001 From: Mariano Riefolo Date: Fri, 20 Sep 2024 10:00:39 +0200 Subject: [PATCH] feat: add docker support --- Dockerfile | 10 ++++++++++ docker-compose.yaml | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f1f7fe6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine:3.20 AS build + +WORKDIR /app +COPY . . + +RUN apk add --no-cache hugo=0.125.4-r3 && hugo --minify + +FROM nginx:1.27.1 AS production + +COPY --from=build /app/public /usr/share/nginx/html diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e975e5b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,6 @@ +services: + web: + build: . + restart: unless-stopped + ports: + - 80:80