Files
portal-mini-go/configs/config.yaml
T
2026-10-27 22:48:36 +08:00

48 lines
1.7 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.
# 服务配置模板。敏感信息(dsn/secret/token)务必通过环境变量覆盖,禁止提交真实值。
server:
port: 8080
mode: debug # debug | release
mysql:
# MySQL 独立配置项;敏感信息通过环境变量注入,禁止硬编码。
host: 124.222.13.236
port: 3306
user: dev
password: JsfiJaWNM7dwREZa
database: dev
charset: utf8mb4
parse_time: "${DB_PARSE_TIME:-True}"
loc: "${DB_LOC:-Local}"
# 连接池
max_idle_conns: "${DB_MAX_IDLE_CONNS:-10}"
max_open_conns: "${DB_MAX_OPEN_CONNS:-100}"
conn_max_lifetime: "${DB_CONN_MAX_LIFETIME:-3600}" # 秒
logging:
level: debug # debug | info | warn | error
format: text # text | json
# 微信小程序凭证现已交由后台管理,持久化在 mini_programs 表(AppID/AppSecret),
# 登录时由请求头 X-App-ID 定位并动态取用,不再依赖本静态配置。
# 如需保留静态兜底配置,可在此声明,但代码当前以数据库为准。
# wechat:
# miniapps:
# app1:
# appid: "${WECHAT_MINIAPPS_APP1_APPID}"
# secret: "${WECHAT_MINIAPPS_APP1_SECRET}"
admin:
# 后台 JWT 签名密钥,务必通过环境变量 ADMIN_JWT_SECRET 注入
jwt_secret: "${ADMIN_JWT_SECRET}"
token_ttl: 720h
# 文件上传服务配置。
# storage_type: local 落盘到 local_path;minio 等对象存储预留,后续接入。
# allowed_ext 为空表示不限制文件类型(仅受 max_size 约束);如需限制填扩展名列表。
upload:
storage_type: local
local_path: ./uploads
base_url: /files/static
max_size: 10485760 # 单文件上限 10MB(字节)
allowed_ext: [] # 例如 [jpg, png, pdf],空表示不限制