Add Docker deployment support and PWA enhancements
- Add Dockerfile with multi-stage build (Node.js + Nginx) - Add docker-compose.yml for Portainer stack deployment on port 7777 - Add nginx.conf with PWA support, gzip compression, and security headers - Add .dockerignore for optimized Docker builds - Add DEPLOYMENT.md with comprehensive deployment guide - Configure Vite PWA plugin with service worker and offline support - Add PWA manifest.json with app icons and shortcuts - Enhance logo.svg with iOS-style glass effects (filters, gradients, highlights) - Add app-icon.svg for PWA installation - Update mobile nav with glassmorphic active tab styling - Fix mobile tab bar layout shift issues with flex-1 and consistent sizing - Update index.html with PWA meta tags and Apple-specific settings - Add health check endpoint at /health for container monitoring Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
58
nginx.conf
Normal file
58
nginx.conf
Normal file
@@ -0,0 +1,58 @@
|
||||
server {
|
||||
listen 7777;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
||||
|
||||
# PWA Support - proper MIME types
|
||||
location ~* \.(?:manifest|webmanifest|json)$ {
|
||||
add_header Cache-Control "public, max-age=3600";
|
||||
add_header Content-Type application/manifest+json;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|css|woff2|woff|ttf|otf|eot|svg|png|jpg|jpeg|gif|ico)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Vue Router - SPA fallback
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Service Worker
|
||||
location /sw.js {
|
||||
add_header Cache-Control "no-cache";
|
||||
proxy_cache_bypass $http_pragma;
|
||||
proxy_cache_revalidate on;
|
||||
expires off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location /workbox-*.js {
|
||||
add_header Cache-Control "no-cache";
|
||||
proxy_cache_bypass $http_pragma;
|
||||
proxy_cache_revalidate on;
|
||||
expires off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Health check endpoint
|
||||
location /health {
|
||||
access_log off;
|
||||
return 200 "healthy\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user