28 lines
551 B
Docker
28 lines
551 B
Docker
|
FROM git.libreschool.org/bglug/hugo-extended:latest AS hugobuild
|
||
|
|
||
|
COPY . /src
|
||
|
|
||
|
RUN \
|
||
|
hugo -s /src --gc --minify
|
||
|
|
||
|
FROM alpine:latest
|
||
|
|
||
|
RUN \
|
||
|
apk -U upgrade && \
|
||
|
apk add nginx curl logrotate && \
|
||
|
mkdir -p /wwwroot /logs
|
||
|
|
||
|
COPY docker/rootfs /
|
||
|
COPY --from=hugobuild /src/public /wwwroot/
|
||
|
|
||
|
RUN \
|
||
|
chown -R nginx:www-data /wwwroot /logs && \
|
||
|
chmod -R a-x,a=rX,ug+w /wwwroot /logs
|
||
|
|
||
|
# config test
|
||
|
RUN nginx -t
|
||
|
|
||
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail -o /dev/null http://127.0.0.1:80/
|
||
|
|
||
|
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]
|