Files
iotlcm/config.example/admin-ui/default.conf
T
MiFaZhan bc2c7bcc6b init: IotLCM 开源版部署仓
内容:
- docker-compose.yml:14 个基础/业务服务 + 3 个可选 profile(with-mock 挡板、with-bot、with-nginx)
- .env.example:集中管理镜像仓库、口令、端口;必填项缺失时 compose 直接报错退出
- config.example/:10 份配置模板,全部为占位值与注释说明
- schema/:12 个初始化脚本,按文件名顺序由 MySQL initdb 自动执行

脱敏处理:
- 生产/内网 IP、镜像仓库地址、公司名、真实域名全部清除
- 演示账号保留 18 个(出库与划拨依赖账号与部门树的关联),
  昵称/邮箱/手机号/登录IP/头像改为占位或编造值
- 数据库账号与 admin 口令改为初始化时按 .env 注入计算
- 通道模板与 Mock 通道的上游密钥置空
- Mock 通道地址指向 compose 内 onelink-mock 服务

部署时用 --profile with-mock 启动运营商接口挡板,即可在无真实运营商环境时跑通全链路。
2026-10-28 13:40:12 +08:00

62 lines
1.8 KiB
Plaintext

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;
}