build(docker): add multi-stage Dockerfile with nginx and docker-compose

Add containerization support for production deployment:
- Multi-stage Dockerfile using Bun for build and nginx for serving
- docker-compose.yml for container orchestration
- nginx.conf with gzip compression, caching headers, and security headers
This commit is contained in:
2026-04-04 16:49:13 +10:30
parent 13e8d8f19a
commit eb9161804e
3 changed files with 69 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied any;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
location / {
try_files $uri $uri/ /index.html;
}
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
}