ci: add test environment client deployment

This commit is contained in:
2026-07-30 21:52:18 +08:00
parent 4cef53e842
commit 7ef4639029
5 changed files with 120 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /healthz {
default_type text/plain;
return 200 "ok\n";
}
# 前端统一请求 /api,保持原始路径转发给 Gateway。
location /api/ {
proxy_pass ${API_UPSTREAM};
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;
}
# 支持 Vue Router history 路由直接刷新。
location / {
try_files $uri $uri/ /index.html;
}
}