Refactor/class based gunicorn conf (#608)

* use class for conf

* format caddy file

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden 2021-07-01 15:59:39 -08:00 committed by GitHub
parent 8a2ed0bd78
commit b54a7d4fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,35 +1,34 @@
{ {
auto_https off auto_https off
admin off admin off
} }
:80 { :80 {
@proxied path /api/* /docs /openapi.json @proxied path /api/* /docs /openapi.json
@static { @static {
file file
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
} }
encode gzip zstd encode gzip zstd
# Handles Recipe Images / Assets
handle_path /api/media/recipes/* {
header @static Cache-Control max-age=31536000
root * /app/data/recipes/
file_server
}
# Handles Recipe Images / Assets handle @proxied {
handle_path /api/media/recipes/* { uri strip_suffix /
header @static Cache-Control max-age=31536000 reverse_proxy http://127.0.0.1:9000
root * /app/data/recipes/ }
file_server
}
handle @proxied { handle {
uri strip_suffix / header @static Cache-Control max-age=31536000
reverse_proxy http://127.0.0.1:9000 root * /app/dist
} try_files {path}.html {path} /
file_server
handle { }
header @static Cache-Control max-age=31536000
root * /app/dist
try_files {path}.html {path} /
file_server
}
} }