chore: 并入 iotlcm-deploy 历史到 deploy/(原提交 eb97c53)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:00 +08:00
19 changed files with 7648 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
charset utf-8;
client_max_body_size 200m;
access_log /var/log/nginx/access_admin-ui.log;
error_log /var/log/nginx/error_admin-ui.log;
# 入口 HTML 不强缓存,保证发布后立即生效
location = /index.html {
try_files $uri =404;
add_header Cache-Control no-cache,no-store,must-revalidate always;
add_header Pragma no-cache always;
add_header Expires 0 always;
}
# 运行时配置文件不强缓存
location ~* ^/(?:_app[.]config[.]js|config[.]json|menu-setting[.]json|setting[.]json)$ {
try_files $uri =404;
add_header Cache-Control no-cache,no-store,must-revalidate always;
add_header Pragma no-cache always;
add_header Expires 0 always;
}
# 带 hash 的静态资源长期缓存
location ~* ^/(?:js|jse|css)/ {
try_files $uri =404;
add_header Cache-Control public,max-age=31536000,immutable always;
}
location / {
try_files $uri $uri/ /index.html;
}
# 后端 API 转发(同 compose 内服务名)
location /api/ {
proxy_set_header Connection upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_pass http://admin-svr:8008/api/v1/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 上传文件目录(与 admin-svr 共享同一挂载卷)
location /upload/ {
alias /app/upload/;
}
location /app/upload/ {
alias /app/upload/;
}
gzip on;
gzip_types text/plain application/javascript text/css application/json;
}