mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-09 03:04:54 -04:00
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:
parent
8a2ed0bd78
commit
b54a7d4fcc
47
Caddyfile
47
Caddyfile
@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user