This commit is contained in:
parent
b11dd66b6d
commit
2923042243
6
Caddyfile
Normal file
6
Caddyfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
:80
|
||||||
|
|
||||||
|
root * /data
|
||||||
|
file_server {
|
||||||
|
precompressed gzip
|
||||||
|
}
|
26
Dockerfile
26
Dockerfile
@ -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
|
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user