Files
root b4f29d4966
Main CI / check-and-build (push) Successful in 1m18s
Development CI / check-and-build (push) Successful in 34s
GitHub Git mirror / mirror (push) Successful in 7s
Development CI / deploy-development (push) Successful in 25s
Add Gitea CI and automatic dev deployment
2026-10-29 21:30:28 +08:00

35 lines
842 B
Nginx Configuration File

server {
listen 80;
root /usr/share/nginx/html;
resolver 127.0.0.11 valid=5s ipv6=off;
location /api/ {
set $api_upstream api:8000;
proxy_pass http://$api_upstream;
proxy_http_version 1.1;
# Preserve SSE delivery and WebSocket upgrades.
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 1h;
}
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
}
map $http_upgrade $connection_upgrade {
default upgrade;
"" "";
}