Add Docker deployment for mcwaddams.mcp.website
Multi-stage build: Node 22 for Astro build, Caddy 2 Alpine for static file serving. Reverse-proxied via caddy-docker-proxy.
This commit is contained in:
parent
e537ddcda6
commit
3af91e8a9d
6 changed files with 101 additions and 0 deletions
24
Caddyfile
Normal file
24
Caddyfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
:8080 {
|
||||
root * /srv
|
||||
file_server
|
||||
|
||||
handle /health {
|
||||
respond "OK" 200
|
||||
}
|
||||
|
||||
# SPA-style fallback for clean URLs
|
||||
try_files {path} {path}/ {path}.html /index.html
|
||||
|
||||
# Cache static assets aggressively
|
||||
@static path *.css *.js *.svg *.png *.webp *.jpg *.jpeg *.gif *.ico *.woff *.woff2
|
||||
header @static Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
# Security headers
|
||||
header {
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "DENY"
|
||||
Referrer-Policy "strict-origin-when-cross-origin"
|
||||
}
|
||||
|
||||
encode gzip zstd
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue