Update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl 2024-07-14 16:39:16 +02:00
parent b11dd66b6d
commit 2923042243
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9
3 changed files with 12 additions and 22 deletions

6
Caddyfile Normal file
View File

@ -0,0 +1,6 @@
:80
root * /data
file_server {
precompressed gzip
}

View File

@ -1,27 +1,11 @@
FROM klakegg/hugo:0.56.3-alpine as build FROM klakegg/hugo:alpine as build
WORKDIR /usr/src/build WORKDIR /usr/src/build
COPY ./ ./ COPY ./ ./
RUN apk --no-cache add --update make RUN apk --no-cache add --update make
RUN hugo && \ RUN hugo && \
make -C public/ -f ../Makefile 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 "{}" \;
FROM caddy
# Stage: Run COPY Caddyfile /etc/caddy/Caddyfile
COPY ./.well-known/ /data/.well-known
FROM nginx:alpine COPY --from=build /usr/src/build/public /data
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

View File

@ -14,7 +14,7 @@
{{ range .Pages }} {{ range .Pages }}
<li> <li>
<span>{{ .Date.Format "02 Jan" }}</span> <span>{{ .Date.Format "02 Jan" }}</span>
<a href="{{ .Permalink }}" id="{{ .UniqueID }}" alt="{{ .Title }}">{{ .Title | markdownify }}</a> <a href="{{ .Permalink }}" id="{{ .File.UniqueID }}" alt="{{ .Title }}">{{ .Title | markdownify }}</a>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>