Files
ai_dianshang/server/configs/config.prod.yaml
2025-11-17 13:32:54 +08:00

80 lines
2.8 KiB
YAML
Raw Permalink 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.

# 生产环境配置
server:
port: 8060
mode: release # debug, release, test
# 数据库配置 - 生产环境
database:
driver: mysql
host: 8.149.233.36
port: 3306
username: ai_dianshang
password: "7aK_H2yvokVumr84lLNDt8fDBp6P"
dbname: ai_dianshang
charset: utf8mb4
parseTime: true
loc: Local
autoMigrate: false # 生产环境禁用自动迁移
logLevel: silent # 生产环境关闭GORM SQL日志
# Redis配置 - 生产环境
redis:
host: localhost
port: 6379
password: ""
db: 0
# JWT配置 - 生产环境
jwt:
secret: "your-production-jwt-secret-key"
expire: 7200
# 日志配置 - 生产环境
log:
level: info # debug, info, warn, error
filename: logs/app.prod.log
maxSize: 200 # MB
maxAge: 30 # 天
maxBackups: 10 # 保留文件数
enableConsole: true # 生产环境不输出到控制台
enableFile: true
format: json
enableCaller: true # 生产环境关闭调用者信息
enableOperation: true
enablePerf: true
perfThreshold: 2000 # 生产环境更宽松的性能阈值
# 微信小程序配置 - 生产环境
wechat:
appId: "wxccc7018b3bfff234"
appSecret: "fa5802a24e7dca8a3cf91ad1e2f288e8"
# 微信支付配置 - 开发环境
wechatPay:
environment: "production" # sandbox(沙箱) 或 production(生产)
appId: "wxccc7018b3bfff234" # 您的真实微信小程序AppID
mchId: "1726717114" # 您的真实微信支付商户号
apiV3Key: "M2nB4vCxZ7qW8eKrDtA1jHlP5gF3sN9y" # 您的真实APIv3密钥(32位)
certPath: "certs/apiclient_cert.pem" # 商户证书路径
keyPath: "certs/apiclient_key.pem" # 商户私钥路径
serialNo: "26DA8C2BC03B796222DA3FCFC6825B236A8C7538" # 证书序列号
notifyUrl: "https://tral.cc/api/v1/payment/notify" # 支付回调地址
refundNotifyUrl: "https://tral.cc/api/refunds/callback" # 退款回调地址
# 文件上传配置 - 生产环境
upload:
maxImageSize: 5242880 # 5MB (5 * 1024 * 1024)
maxFileSize: 10485760 # 10MB (10 * 1024 * 1024)
imageTypes: [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"]
staticPath: "./static"
baseUrl: "http://localhost:8080"
storageType: "oss" # local(本地存储) 或 oss(阿里云OSS)
# 阿里云OSS配置当storageType为oss时生效
oss:
endpoint: "oss-cn-beijing.aliyuncs.com" # OSS访问域名根据你的地域修改
accessKeyId: "LTAI5tNesdhDH4ErqEUZmEg2" # 你的AccessKey ID
accessKeySecret: "xZn7WUkTW76TqOLTh01zZATnU6p3Tf" # 你的AccessKey Secret
bucketName: "bxmkb-beijing" # 你的Bucket名称
basePath: "dianshang/" # 文件存储基础路径
domain: "" # 自定义域名可选如果有CDN加速域名