Files
corestack/config.example.yaml
2025-08-23 07:30:51 +08:00

45 lines
1.2 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.

# 配置文件示例
# 请将此文件复制为config.yaml并根据实际环境修改
# 服务器配置
server:
worker_id: 1 # 工作节点ID用于雪花算法范围0-1023
# 数据库配置
mysql:
max_open_conns: 100 # 最大打开连接数
max_idle_conns: 20 # 最大空闲连接数
conn_max_lifetime: "30m" # 连接最大生命周期
# Redis配置
redis:
db: 0 # Redis数据库编号
pool_size: 10 # 连接池大小
dial_timeout: "5s" # 拨号超时时间
read_timeout: "3s" # 读取超时时间
write_timeout: "3s" # 写入超时时间
# 日志配置
logging:
level: "info" # 日志级别debug, info, warn, error, dpanic, panic, fatal
development: true # 开发模式
encoding: "console" # 日志编码console, json
output_paths: ["stdout"] # 输出路径
error_output_paths: ["stderr"] # 错误输出路径
# 功能模块配置
feature:
# 阿里云短信服务配置
sms:
access_key_id: "your_access_key_id"
access_key_secret: "your_access_key_secret"
# 账户服务配置
account:
sms_credential:
sign_name: "your_sign_name"
template_code: "your_template_code"
# NSQ配置
nsq:
topics:
user_register: "user_register"