feat: docker & build
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Static SPA server baked into the webui PROD image (Dockerfile.prod).
|
||||
# Only serves the built assets + SPA fallback. API routing belongs to the
|
||||
# outer reverse proxy in the future prod compose.
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Long-cache hashed build assets.
|
||||
location /static/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# SPA: every unknown path falls back to index.html (client-side router).
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user