Files
iotlcm/config/admin-svr/config.yaml
T

225 lines
5.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# iotlcm-admin-svr 配置示例
#
# 文件已随部署仓提供可运行默认值;正式上线前修改口令等配置。
# ============================================================
system:
name: "IotLCM"
version: "1.0"
description: "IotLCM Server"
gfmode: "prod" # prod / dev
upload:
local:
path: "resource/upload"
workerDiagnostic:
enabled: true
server:
address: ":8008"
openapiPath: "/api.json"
swaggerPath: "/swagger"
indexFiles: ["index.html", "index.htm"]
indexFolder: false
fileServerEnabled: true
initLoadMemoryDB: false
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
logger:
path: "/app/logs"
file: "{Y-m-d-H}.log"
prefix: ""
level: "info"
timeFormat: "2006-01-02T15:04:05"
ctxKeys: []
header: true
stdout: true
rotateSize: 0
rotateExpire: 0
rotateBackupLimit: 0
rotateBackupExpire: 0
rotateBackupCompress: 0
rotateCheckInterval: "1h"
stdoutColorDisabled: false
writerColorEnable: false
# ---------- JWT ----------
# 必改:signingKey 必须与 openapi、app-server 完全一致。
jwt:
signingKey: "1f8b3c5d7e9a2b4c6d8e0f1a3b5c7d9e1f8b3c5d7e9a2b4c6d8e0f1a3b5c7d9e"
expiresTime: 7d
bufferTime: 1d
issuer: iotlcm
captcha:
keyLong: 6
imgWidth: 240
imgHeight: 80
openCaptcha: 0
openCaptchaTimeout: 3600
# ---------- 数据库 ----------
database:
# 旧平台库(历史数据对接)。不使用时空 link 即可。
legacyCard:
link: ""
debug: false
maxOpen: 5
maxIdle: 2
logger:
path: "/app/logs"
level: "all"
stdout: true
default:
# 使用与其余服务相同的 u_iotlcm 应用账号。
link: "mysql:u_iotlcm:Iotlcm2026Default@tcp(mysql:3306)/db_iotlcm?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: "/app/cache"
batch:
allocate:
chunkSize: 5000
maxFileSize: 52428800 # 50MB
# ---------- 流量预警 ----------
warning:
expire:
firstWarnDays: 30
secondWarnDays: 15
thirdWarnDays: 7
# 短信通道:指向 iotlcm-sms 服务。不用短信时 enabled 改 false。
sms:
enabled: true
url: "http://iotlcm-sms:11190/api/v1/sms/send"
grpcAddr: "iotlcm-sms:11200"
timeout: "5s"
# 以下为短信服务商参数,一般留空(由 sms 服务统一持有)
routerId: 0
serviceType: ""
regionId: ""
accessKeyId: ""
accessKeySecret: ""
sdkAppId: ""
signName: ""
templateId: ""
msgContentTemplate: ""
# 微信小程序订阅消息。不用时 enabled 改 false。
wechat:
enabled: false
appId: ""
appSecret: ""
templateId: ""
page: "pages/message/index"
timeout: "5s"
# ---------- 注册验证码 ----------
register:
# 走 HTTP 短信网关
sms:
url: ""
method: "POST"
headers: {}
bodyTemplate: '{"phone":"{contact}","code":"{code}"}'
successStatus: 200
# 走 SMTP 邮件
email:
host: "" # 如 smtp.example.com
port: 465
username: ""
password: ""
from: ""
fromName: "物联网卡管理平台"
subject: "注册验证码"
bodyTemplate: "您的注册验证码是:{code},6小时内有效。"
ssl: true
# ---------- Redis ----------
redis:
default:
mode: "single" # single / cluster / sentinel
sentinelMasterName: ""
address: "redis:6379"
db: 0
pass: "Iotlcm2026Default"
minIdle: 5
maxIdle: 30
maxActive: 5000
idleTimeout: "60s"
ClientName: "SystemCache"
# ---------- RabbitMQ ----------
rabbitmq:
enabled: true
dsn: "amqp://iotlcm:Iotlcm2026Default@rabbitmq:5672/"
# ---------- TDengine(流量历史) ----------
# 需要 TDengine 3.x 的 WebSocket 接口(6041)。
# 不启用时序库时 link 留空,历史流量相关功能不可用。
tsdb:
database: "TdEngine"
tdengine:
type: "taosWS"
dsn: ":@ws(:)/"
dbName: ""
dailyDbName: ""
monthlyDbName: ""
maxOpenConns: 100
maxIdleConns: 10
# ---------- 免登录白名单 ----------
router:
exceptLogin:
- /api/v1/system/auth/login
- /api/v1/system/auth/refresh
- /api/v1/system/captcha
- /api/v1/system/auth/getTenantList
- /openapi/v3/query/token
- /api/v1/system/tTplatformSetting/view
- /api/v1/pay/alipay/notify
- /api/v1/pay/alipay/return
# ---------- 支付宝(可选) ----------
# 不使用支付功能时整段删掉。
alipay:
appId: ""
privateKey: ""
alipayPublicKey: ""
notifyUrl: "https://your-domain.example.com/api/v1/pay/alipay/notify"
returnUrl: "https://your-domain.example.com/#/enterpriseManagement/tBalanceDetail/tAgentBalance"
isProduction: false
pay:
expireTime: 60
balanceRecharge:
timeoutDelay: "30m"
# ---------- 上游服务地址 ----------
# 指向同 compose 内的服务名,一般无需修改。
upstream:
# 控制台智能诊断内部凭据,须与 upstream-proxy 的 appDiagnosis.internalToken 一致
appDiagnosisToken: "iotlcm_diagnosis_2026"
proxy:
address: "upstream-proxy:8510"
timeout: 10s
gateway:
address: "upstream-chan:8110"
timeout: 10s