From 292304224341d0840b9a7843cc46f962a5126605 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 14 Jul 2024 16:39:16 +0200 Subject: [PATCH] Update --- Caddyfile | 6 ++++++ Dockerfile | 26 +++++--------------------- layouts/archive/single.html | 2 +- 3 files changed, 12 insertions(+), 22 deletions(-) create mode 100644 Caddyfile diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..43b3438 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,6 @@ +:80 + +root * /data +file_server { + precompressed gzip +} diff --git a/Dockerfile b/Dockerfile index e01b642..88d1668 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,11 @@ -FROM klakegg/hugo:0.56.3-alpine as build +FROM klakegg/hugo:alpine as build WORKDIR /usr/src/build COPY ./ ./ RUN apk --no-cache add --update make RUN hugo && \ make -C public/ -f ../Makefile - # find ./ -type f \( \ - # -name "*.html" \ - # -o -name "*.js" \ - # -o -name "*.css" \ - # -o -name "*.xml" \ - # -o -name "*.json" \ - # -o -name "*.txt" \ - # -o -name "*.png" \ - # -o -name "*.ico" \ - # -o -name "*.svg" \ - # -not -name "*.gz" \) \ - # -exec gzip -v -k -9 "{}" \; - -# Stage: Run - -FROM nginx:alpine -RUN rm /usr/share/nginx/html/* -COPY --from=build /usr/src/build/public /usr/share/nginx/html/ -COPY ./.well-known/ /usr/share/nginx/html/.well-known -EXPOSE 80 +FROM caddy +COPY Caddyfile /etc/caddy/Caddyfile +COPY ./.well-known/ /data/.well-known +COPY --from=build /usr/src/build/public /data diff --git a/layouts/archive/single.html b/layouts/archive/single.html index 046ac2f..82171a1 100644 --- a/layouts/archive/single.html +++ b/layouts/archive/single.html @@ -14,7 +14,7 @@ {{ range .Pages }}
  • {{ .Date.Format "02 Jan" }} - {{ .Title | markdownify }} + {{ .Title | markdownify }}
  • {{ end }}