Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rewrites for .html; switch to caddy (#148)
This might seem like a drastic change, but it's really not a big deal, since we aren't using advanced configs anyways. Caddy's configuration language is much saner for our use-case, and it even opens the door to api-based config.
- Loading branch information
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/bin/sh | ||
|
||
c=$(buildah from docker.io/nginx:1.23.3-alpine) | ||
buildah add $c raku-doc-website.tar.gz /usr/share/nginx/html | ||
c=$(buildah from docker.io/caddy:latest) | ||
buildah add $c raku-doc-website.tar.gz /usr/share/caddy | ||
buildah add $c Caddyfile /etc/caddy/Caddyfile | ||
buildah commit --rm $c quay.io/colemanx/raku-doc-website:latest | ||
buildah push quay.io/colemanx/raku-doc-website:latest | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Unless the file starts with a global options block, the first | ||
# uncommented line is always the address of your site. | ||
|
||
|
||
:80 { | ||
# Set this path to your site's directory. | ||
@htmlext { | ||
path_regexp static (/.*)\.(html?)$ | ||
} | ||
|
||
root * /usr/share/caddy | ||
try_files {path}.html {path} | ||
|
||
|
||
# Enable the static file server. | ||
file_server | ||
} | ||
|
||
# Refer to the Caddy docs for more information: | ||
# https://caddyserver.com/docs/caddyfile | ||
|