Files
goalfylearning-admin/etc/config.yaml
2025-12-05 17:33:13 +08:00

99 lines
3.8 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.

server:
addr: "0.0.0.0"
port: 8087
database:
# dsn: "root:root@tcp(127.0.0.1:3306)/test?charset=utf8mb4&parseTime=True&loc=Local"
dsn: "goalfylearning:BswGl4amnt8yMxHZ@tcp(goalfyagent-aurora-mysql-staging.cb2sq6y2mg93.us-west-2.rds.amazonaws.com:3306)/goalfylearning?charset=utf8mb4&parseTime=True&loc=UTC&timeout=5s"
maxIdleConns: 10
maxOpenConns: 100
logLevel: "info"
gateway:
base_url: "http://44.247.156.94:8080"
timeout: 30
auth:
login_url: "http://44.247.156.94:8080/aigateway-admin/api/login"
key: "Jiahe.123"
sso:
sso_server_url: "https://passport.goalfy.ai"
client_id: "65UfE5S-Sg--pRhWro06eQ"
redirect_uri: "http://localhost:3003"
scope: "openid profile email"
resource_aud: "api://admin"
timeout: 30s
admin_token: "goalfy_admin_token_1028_v1"
# OSS 对象存储配置
oss:
endpoint: "oss-accelerate.aliyuncs.com" # 阿里云全球加速域名(推荐) | 区域域名: oss-cn-hangzhou.aliyuncs.com
region: "us-west-1" # OSS区域: oss-cn-hangzhou(杭州), oss-cn-beijing(北京), oss-cn-shanghai(上海)
access_key_id: "LTAI5tJ2QteAyQ6ZkAmyj5j5" # 阿里云AccessKey ID
access_key_secret: "VJEsdR6rM8i4h1wK371yFB0bgYdTUw" # 阿里云AccessKey Secret
bucket: "goalfylearning-qa" # 阿里云OSS存储桶名称
upload_max_size: 104857600 # 上传文件最大大小(100MB)
presign_url_expire: 30m # 预签名URL有效期
# arn: "acs:ram::xxxxx:role/xxxxx" # 阿里云RAM角色ARN(可选,用于STS临时凭证)
# assume_role_arn: "" # 阿里云不需要此字段(AWS S3专用)
log:
level: "debug"
format: "json"
output: "stdout"
message_push:
goalfymax_base_url: "https://staging-goalfylearning.goalfyai.com" # GoalfyMax后端服务地址
timeout: 30 # 请求超时时间(秒)
retry_count: 3 # 重试次数
retry_interval: 1000 # 重试间隔(毫秒)
redis:
addr: "localhost:6379" # Redis地址
password: "" # Redis密码
db: 0 # Redis数据库编号
email:
sender: "invite_goalfymax@goalfyai.com" # 发件人邮箱必须与username一致
host: "smtp.mxhichina.com" # SMTP服务器地址
port: 465 # SMTP端口465为SSL
username: "invite_goalfymax@goalfyai.com" # SMTP用户名
password: "MXZ1IQMVrQLJBU05" # SMTP密码
invite_url_prefix: "https://passport.goalfy.ai/invite/" # 邀请注册链接前缀
postgresql:
host: "goalfyagent-staging.cb2sq6y2mg93.us-west-2.rds.amazonaws.com"
port: 5432
user: "postgres"
password: "yM$y$mnG$3*a"
dbname: "mcp_gateway"
sslmode: "require"
max_open_conns: 100 # Optimized for 1000 qps target
max_idle_conns: 20 # Maintain more warm connections
conn_max_lifetime: 30m # Reduce reconnection overhead
conn_max_idle_time: 5m # Keep connections warm longer
# 支付服务配置
pay:
base_url: "http://goalfy-pay:8080" # goalfy-pay 服务地址
timeout: 30 # 请求超时时间(秒)
jobs:
mcp_usage_balance:
enabled: true
run_on_startup: true
delay_minutes: 5
model_token_balance:
enabled: true
run_on_startup: true
delay_minutes: 5
alert:
dingtalk:
enabled: true
webhook: "https://oapi.dingtalk.com/robot/send?access_token=7edbbc4c115e0848730a0c13ba56c95bb854db9add5a4e6153dfc4ab7eea0148"
secret: "SEC059acbd1014046f5c1cefe33c209eaab155838ed2ec6a91bf70889d04abe27d3"
timeout_seconds: 5
keyword: "" # 设置为钉钉机器人配置的关键词,例如“余额告警”