From f927450f897e84e85677e5fbd4419d9d5205da4e Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Wed, 22 Nov 2023 10:49:23 +0200 Subject: [PATCH] feat: Dockerfile and nginx.conf --- Dockerfile | 17 +++++++++++++++++ nginx.conf | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77f18bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:edge AS builder + +RUN apk add zola + +RUN mkdir /src +WORKDIR /src + +COPY . /src + +RUN zola build + +# -- + +FROM nginx:1.25.3-alpine + +COPY --from=builder /src/public /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..49c8e03 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,23 @@ +server { + listen 80; + listen [::]:80; + server_name _; + + access_log /var/log/nginx/host.access.log main; + + gzip on; + gzip_comp_level 6; + gzip_types + text/html + text/css + application/javascript + image/svg+xml + font/woff2; + + root /usr/share/nginx/html; + error_page 404 /404.html; + + location / { + index index.html; + } +} -- 2.44.1