Add Docker image and compose for Needle web exports
Serve production Vite dist with nginx; optional SampleScene profile. Made-with: Cursor
This commit is contained in:
20
docker/nginx-default.conf
Normal file
20
docker/nginx-default.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# SPA / static Needle export
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# wasm / glb / long cache for hashed assets (optional)
|
||||
location ~* \.(wasm|glb|png|jpg|jpeg|webp|ico|svg)$ {
|
||||
try_files $uri =404;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_types text/css application/javascript application/json image/svg+xml;
|
||||
}
|
||||
Reference in New Issue
Block a user