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