- Dockerfile: apps/web-antd → apps/web-antdv-next(实际落点) - Dockerfile: pnpm build:antd(不存在)→ turbo build --filter=@vben/web-antdv-next - Dockerfile: 新增 nginx.conf(原 COPY 目标文件不存在导致 build 失败) - Jenkinsfile: 移除飞书通知(凭证 feishu-* 未配,导致构建启动即 FAIL) - Jenkinsfile: 部署 node(deploy-agent)→ SSH 直连 cd-target(无该 agent 节点) - Jenkinsfile: 清除硬编码 webhook URL 明文
39 lines
1.1 KiB
Nginx Configuration File
39 lines
1.1 KiB
Nginx Configuration File
# BuildFlow Web (web-antdv-next) Nginx 运行配置
|
|
# 仅 server 块,作为 conf.d/default.conf 覆盖 nginx 默认站点
|
|
# - SPA history 路由回退 index.html
|
|
# - /api 反代到后端(生产由部署侧决定是否启用)
|
|
# - 静态资源长缓存
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_comp_level 6;
|
|
gzip_types text/plain text/css text/xml text/javascript
|
|
application/javascript application/json application/xml
|
|
application/rss+xml image/svg+xml font/woff font/woff2;
|
|
|
|
# SPA history fallback
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Vite 产物带 hash 文件名,可安全 immutable 长缓存
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# 安全响应头
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
}
|