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
+141
View File
@@ -0,0 +1,141 @@
# ============================================================
# IotLCM 对外入口 nginx 配置示例
#
# 作用:把多个服务按路径分流到统一域名下。
# 若宿主机已有 nginx 或面板,可不启动本容器,
# 把下面的 location 段落并入宿主机配置即可。
#
# 把 your-domain.example.com 替换为你的实际域名。
# ============================================================
upstream iotlcm_admin_api {
server admin-svr:8008;
}
upstream iotlcm_admin_ui {
server admin-ui:80;
}
upstream iotlcm_openapi_api {
server openapi:8000;
}
upstream iotlcm_docs {
server docs:80;
}
upstream iotlcm_app_web {
server app-web:80;
}
upstream iotlcm_app_server {
server app-server:8010;
}
# ---------- OpenAPI 对外域名 ----------
server {
listen 80;
server_name api.your-domain.example.com;
client_max_body_size 200m;
location ^~ /openapi/v3/ {
proxy_pass http://iotlcm_openapi_api;
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;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
}
# 运营商能力代理(白名单转发 / 共享 Token)
location ^~ /route/open/ {
proxy_pass http://iotlcm_openapi_api;
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;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
}
location / {
proxy_pass http://iotlcm_openapi_api;
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;
}
}
# ---------- 管理端 ----------
server {
listen 80;
server_name admin.your-domain.example.com;
client_max_body_size 200m;
location / {
proxy_pass http://iotlcm_admin_ui;
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;
}
# 文档站(子路径 /docs/)
location = /docs {
return 301 /docs/;
}
location /docs/ {
proxy_pass http://iotlcm_docs;
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;
}
}
# ---------- 小程序 / H5 ----------
server {
listen 80;
server_name app.your-domain.example.com;
client_max_body_size 200m;
location ^~ /app/api/v1/ {
proxy_pass http://iotlcm_app_server/api/v1/;
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;
proxy_read_timeout 120s;
proxy_send_timeout 120s;
}
location ^~ /app/ {
proxy_pass http://iotlcm_app_web;
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;
}
location / {
proxy_pass http://iotlcm_app_web;
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;
}
}