2026-08-31 18:01:34 +08:00
|
|
|
upstream gemold_backend_upstream {
|
|
|
|
|
server backend:8000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
server {
|
2026-09-26 20:53:21 +08:00
|
|
|
listen 8000;
|
2026-08-31 18:01:34 +08:00
|
|
|
server_name _;
|
|
|
|
|
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
location /assets/ {
|
|
|
|
|
try_files $uri =404;
|
|
|
|
|
access_log off;
|
|
|
|
|
expires 30d;
|
|
|
|
|
add_header Cache-Control "public, max-age=2592000, immutable";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /api/ {
|
|
|
|
|
proxy_pass http://gemold_backend_upstream;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /health {
|
|
|
|
|
proxy_pass http://gemold_backend_upstream;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location /html/ {
|
|
|
|
|
proxy_pass http://gemold_backend_upstream;
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
}
|