[FEAT] Add docker files
This commit is contained in:
24
Caddyfile.docker
Normal file
24
Caddyfile.docker
Normal file
@@ -0,0 +1,24 @@
|
||||
:1337 {
|
||||
root * /srv/dist
|
||||
encode zstd gzip
|
||||
|
||||
# Aggressive caching for static assets
|
||||
@static path *.js *.css *.png *.jpg *.jpeg *.gif *.webp *.svg *.woff *.woff2 *.ico
|
||||
header @static Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
# Short cache for HTML (for SPA updates)
|
||||
@html path *.html /
|
||||
header @html Cache-Control "no-cache, must-revalidate"
|
||||
|
||||
# Default cache for everything else
|
||||
header ?Cache-Control "max-age=1800"
|
||||
|
||||
try_files {path} /index.html
|
||||
file_server {
|
||||
precompressed zstd gzip
|
||||
}
|
||||
|
||||
log {
|
||||
output stdout
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user