Skip to content

Instantly share code, notes, and snippets.

@zet4
Created March 7, 2017 21:29
Show Gist options
  • Save zet4/cb24ebe3f53115d183f72f3abe9f99e2 to your computer and use it in GitHub Desktop.
Save zet4/cb24ebe3f53115d183f72f3abe9f99e2 to your computer and use it in GitHub Desktop.
Hugo Blog
:3000 {
root /var/www/html
minify
gzip
header /js /css /img Cache-Control "max-age=2592000"
header / {
X-Frame-Options DENY
Content-Security-Policy "default-src 'self'; script-src 'self' oss.maxcdn.com maxcdn.bootstrapcdn.com fonts.googleapis.com cdnjs.cloudflare.com; style-src 'self' maxcdn.bootstrapcdn.com fonts.googleapis.com cdnjs.cloudflare.com;"
Referrer-Policy "same-origin"
X-XSS-Protection "1;mode=block"
}
log / stdout "{>Cf-Connecting-Ip} - [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\""
errors stdout
git github.com/user/repo /var/www/app {
hook /webhook some-secret-blah
then hugo --destination=/var/www/html
}
}
FROM zzrot/alpine-caddy:latest
RUN apk --no-cache add hugo
COPY Caddyfile /etc/Caddyfile
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment