0a3558fc51
- Add Dockerfile for frontend and server services - Add Docker Compose configs (standard and offline mode) - Add nginx.conf for admin-web service - Add deploy scripts: package.sh (packaging) and load-and-start.sh (startup) - Add deploy/config.yaml, .env.example, and prompts.yml configurations - Add image management design specification doc
34 lines
963 B
Nginx Configuration File
34 lines
963 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# SPA fallback — all non-file requests go to index.html
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Proxy API requests to the backend
|
|
location /api {
|
|
proxy_pass http://tenant-api:8080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
|
|
# Cache static assets aggressively
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml;
|
|
}
|