diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000000000000000000000000000000000000..7416457ab3200456d636ccb1fb3bb751e489b1e8 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,35 @@ +http://teckids.org { + root * /srv + encode zstd gzip + file_server + + header { + Content-Security-Policy "default-src 'self'; img-src 'self' data:; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content; base-uri 'self'" + X-Content-Type-Options nosniff + Referrer-Policy strict-origin-when-cross-origin + } + + route { + header Cache-Control "public, max-age=3600" + header /processed_images/* Cache-Control "public, max-age=604800, immutable" + } +} + +http://www.teckids.org { + redir http://teckids.org{uri} permanent +} + +http://hacknsun.camp, http://www.hacknsun.camp { + redir / http://teckids.org/projekte/hack-n-fun/freizeiten/hacknsun/ permanent + error 404 +} + +http://hacknfun.camp, http://www.hacknfun.camp { + redir / http://teckids.org/projekte/hack-n-fun/ permanent + error 404 +} + +http://schul-frei.dev, http://www.schul-frei.dev { + redir / http://teckids.org/projekte/schul-frei/ permanent + error 404 +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..54609ce176a041415468669e56fe5d1566c58aa6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM alpine:latest AS build + +RUN apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ zola yarn + +COPY . /src +WORKDIR /src + +RUN yarn install +RUN zola build + + +FROM caddy:alpine AS serve + +COPY --from=build /src/public/ /srv/ +COPY Caddyfile /etc/caddy/Caddyfile + +RUN caddy fmt --overwrite /etc/caddy/Caddyfile diff --git a/config.toml b/config.toml index 1b4295904c6a3476b4490a06c8cc116ef5720ce3..d01ae5d25879a4fdfc21dcf3274bc975ab9f7b8f 100644 --- a/config.toml +++ b/config.toml @@ -9,8 +9,8 @@ output_dir = "public" compile_sass = true build_search_index = false generate_feed = true -hard_link_static = true -#minify_html = true +hard_link_static = false +minify_html = false taxonomies = [ # Static content groups