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 启动运营商接口挡板,即可在无真实运营商环境时跑通全链路。
This commit is contained in:
MiFaZhan
2026-10-28 13:40:12 +08:00
commit bc2c7bcc6b
26 changed files with 7264 additions and 0 deletions
@@ -0,0 +1,108 @@
# ============================================================
# iotlcm-upstream-chan 配置示例
#
# cp config.example.yaml config.yaml
#
# 本服务负责具体运营商协议对接(移动 OneLink / 电信 CMP /
# 联通 10646 / 各类三方渠道)。
#
# 注意:接入运营商需要在数据库中配置通道(t_sim_channels 等),
# 本文件只配置服务自身参数。
# ============================================================
system:
name: "IotLCM-Upstream-Chan"
version: "1.0"
description: "IotLCM Upstream Channel Service"
gfmode: "prod"
upload:
local:
path: "/app/upload"
server:
name: "iotlcmupstreamchan-http-svc"
address: ":8110"
openapiPath: "/api.json"
swaggerPath: "/swagger"
indexFiles: ["index.html", "index.htm"]
indexFolder: false
fileServerEnabled: true
initLoadMemoryDB: false
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
# ---------- 服务注册 ----------
registry:
type: "consul"
address: "consul:8500"
logger:
path: "/app/logs"
file: "{Y-m-d-H}.log"
prefix: ""
level: "info"
timeFormat: "2006-01-02T15:04:05.000"
ctxKeys: []
header: true
stdout: true
rotateSize: 0
rotateExpire: 0
rotateBackupLimit: 0
rotateBackupExpire: 0
rotateBackupCompress: 0
rotateCheckInterval: "1h"
stdoutColorDisabled: false
writerColorEnable: false
# ---------- 数据库 ----------
database:
logger:
path: "/app/logs"
level: "all"
stdout: true
default:
# 必改:连接串
link: "mysql:u_iotlcm:${MYSQL_APP_PASSWORD}@tcp(mysql:3306)/${MYSQL_DATABASE}?charset=utf8mb4&parseTime=True&loc=Asia%2FShanghai"
debug: false
charset: "utf8mb4"
dryRun: false
maxIdle: 30
maxOpen: 100
maxLifetime: 120
memorydb:
link: "sqlite::@file(:memory:)"
debug: false
maxIdle: 1
maxOpen: 1
maxLifetime: 30
cache:
adapter: "redis"
fileDir: "resource/cache"
# ---------- Redis ----------
redis:
default:
mode: "single"
sentinelMasterName: ""
address: "redis:6379"
db: 0
pass: "${REDIS_PASSWORD}"
minIdle: 5
maxIdle: 30
maxActive: 5000
idleTimeout: "60s"
ClientName: "SystemCache"
# ---------- 依赖行为 ----------
dependencies:
# 运营商 Token 刷新策略
token_refresh:
mode: "expired_only" # expired_only / always
skew_seconds: 600 # 提前刷新的时间窗(秒)
# 移动 OneLink 挡板地址。
# 启动了 onelink-mock(--profile with-mock)时保持此值;
# 对接真实运营商时删掉本段或改为真实地址。
sim_yd_mock_v5:
url: "http://onelink-mock:8080/v5/"