Files
xiaoxia-saas/infra/docker/nginx.conf
T
Xiaoxia AI acaff441bc
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 1m24s
Deploy / Deploy Staging (push) Failing after 18m54s
Deploy / Deploy Production (push) Has been skipped
fix: correct web Dockerfile for Vite (not Next.js)
2026-06-20 14:08:27 +08:00

33 lines
885 B
Nginx Configuration File

server {
listen 80;
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/json application/xml+rss;
# SPA routing - all routes to index.html
location / {
try_files $uri $uri/ /index.html;
}
# API proxy
location /api/ {
proxy_pass http://api:8000/api/;
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;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}