duidui_fiber/config.yaml
2026-03-27 10:34:03 +08:00

75 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.

# DD Fiber API 配置
# 服务配置
service:
name: "dd_fiber_api"
version: "1.0.0"
host: "0.0.0.0"
admin_port: 8080 # 管理端端口
api_port: 8081 # 小程序API端口
# Redis配置
redis:
host: "localhost"
port: 6379
password: ""
db: 0
pool_size: 10
min_idle_conns: 5
# 阿里云OSS配置
oss:
accessKeyId: "LTAI5tHyrdcfXrTUrUReXGDE"
accessKeySecret: "XpepGFPAo7IsXgJKcmvNZ5lFrrSDww"
roleArn: "acs:ram::1482621622160970:role/webtooss"
roleSessionName: "uploadToOss"
region: "cn-hangzhou"
bucketName: "duiduiminiprogram"
# 微信支付配置V3版本
wechat:
app_id: "wx583d78cc00f29dc1" # 微信小程序或公众号 APPID
mch_id: "1503017331" # 商户号
notify_url: "https://c7b2eea80773.ngrok-free.app/api/v1/payment/wechat/v3/notify" # 支付结果通知地址
# notify_url: "https://api.duiduiedu.com/api/v1/payment/wechat/v3/notify" # 支付结果通知地址
api_key_v3: "XJFEnQ7cHNdsu2ZjdFJQKJyurQWhekvB" # API v3密钥
serial_no: "1A6ACD3F2763A812371294C939660B2EF3E17076" # 证书序列号
private_key: "" # 私钥内容PEM格式如果设置了 private_key_path 则留空)
private_key_path: "storage/1503017331_20251231_cert/apiclient_key.pem" # 私钥文件路径
cert_path: "storage/1503017331_20251231_cert/apiclient_cert.pem" # 证书文件路径(可选)
# MySQL配置可选
mysql:
host: "39.97.6.139" # MySQL服务器地址
port: 33066 # MySQL端口
username: "root" # 用户名
password: "shuang0304" # 密码
database: "duidui_db" # 数据库名如果为空则不初始化MySQL
charset: "utf8mb4" # 字符集
max_open_conns: 100 # 最大打开连接数
max_idle_conns: 10 # 最大空闲连接数
conn_max_lifetime: "3600s" # 连接最大生命周期
# MongoDB配置用于题库系统
mongodb:
# uri: "mongodb://admin:admin123456@localhost:27017" # MongoDB 连接字符串
uri: "mongodb://admin:admin123456@39.106.239.223:27017" # MongoDB 连接字符串
# uri: "mongodb://admin:admin123456@mongodb-question:27017" # MongoDB 连接字符串
database: "question_db" # 数据库名
timeout: "10s" # 连接超时时间
# 调度器配置(时间轮定时任务)
scheduler:
tick_interval: "100ms" # 时间轮刻度间隔
slot_num: 3600 # 槽位数量 (100ms * 3600 = 6分钟最大延迟)
# 管理员配置
admin:
jwt_secret: "dd_fiber_api_admin_secret_key_2024" # JWT密钥
jwt_expires_in: "24h" # JWT过期时间
super_admin:
username: "admin" # 超级管理员用户名
password: "" # 超级管理员密码bcrypt加密后的首次启动会自动创建
email: "admin@duiduiedu.com" # 超级管理员邮箱