Last active
July 21, 2019 21:06
-
-
Save Zenithar/d929a44e68ef8a5a85a6 to your computer and use it in GitHub Desktop.
Hugo + Caddy + Webhook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.0.0.0:2015 | |
root blog.zenithar.org/public | |
ext .html | |
gzip | |
git github.com/zenithar/zenithar.hugo { | |
path ../ | |
hook /_admin/github/hook/zenithar.org secret | |
then hugo | |
} | |
log stdout | |
errors { | |
log stderr | |
404 404.html | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM sdurrheimer/alpine-glibc:latest | |
MAINTAINER Thibault NORMAND <[email protected]> | |
RUN apk --update add git ca-certificates curl \ | |
&& rm -rf /var/cache/apk/* | |
RUN echo "Installing Caddy..." \ | |
&& curl -jksSL "https://caddyserver.com/download/build?os=linux&arch=amd64&features=git" | gunzip -c - | tar -xf - -C /tmp \ | |
&& mv /tmp/caddy /usr/local/bin/caddy \ | |
&& rm -f /tmp/*.txt | |
ENV HUGO_VERSION 0.15 | |
RUN echo "Installing Hugo ..." \ | |
&& curl -jksSL "https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux_amd64.tar.gz" | gunzip -c - | tar -xf - -C /tmp \ | |
&& mv /tmp/hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 /usr/local/bin/hugo \ | |
&& rm -rf /tmp/hugo_${HUGO_VERSION}_linux_amd64 | |
RUN adduser -D -u 500 www \ | |
&& mkdir -p /var/www \ | |
&& chown -R www /var/www | |
WORKDIR /var/www | |
EXPOSE 2015 | |
USER www | |
CMD [ "caddy" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment