feat():learning后台管理项目初始化
This commit is contained in:
93
etc/config-prod.yaml
Normal file
93
etc/config-prod.yaml
Normal file
@@ -0,0 +1,93 @@
|
||||
server:
|
||||
addr: "0.0.0.0"
|
||||
port: 8087
|
||||
|
||||
database:
|
||||
dsn: "goalfylearning:GfLrn_2025!aP7zQ@tcp(goalfyagent-aurora-mysql-prod.cb2sq6y2mg93.us-west-2.rds.amazonaws.com:3306)/goalfylearning?charset=utf8mb4&parseTime=True&loc=UTC&timeout=5s"
|
||||
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: "https://goalfylearning-admin.goalfy.ai"
|
||||
scope: "openid profile email"
|
||||
resource_aud: "api://admin"
|
||||
timeout: 30s
|
||||
admin_token: "goalfy_admin_token_1028_v1"
|
||||
|
||||
# OSS 对象存储配置
|
||||
oss:
|
||||
endpoint: "https://staging-biz-goalfylearning.s3.us-west-2.amazonaws.com/" # 可选:S3 兼容端点或阿里云 OSS 域名;AWS S3 可留空
|
||||
region: "us-west-2" # 区域,如 cn-hangzhou / us-west-2
|
||||
access_key_id: "AKIASSWQCE5VWZDYDLMO" # 访问密钥ID
|
||||
access_key_secret: "q2div6qLjfgLYa/u/4f/VxLrgCYN5tDjXcCucLWq" # 访问密钥Secret
|
||||
bucket: "staging-biz-goalfylearning" # 存储桶名称
|
||||
assume_role_arn: "arn:aws:iam::177603749739:role/s3-test" # 可选:用于STS临时凭证
|
||||
presign_url_expire: 30m # 预签名URL有效期
|
||||
|
||||
log:
|
||||
level: "info"
|
||||
format: "json"
|
||||
output: "stdout"
|
||||
|
||||
message_push:
|
||||
goalfymax_base_url: "https://goalfylearning.goalfy.ai" # GoalfyMax后端服务地址
|
||||
timeout: 30 # 请求超时时间(秒)
|
||||
retry_count: 3 # 重试次数
|
||||
retry_interval: 1000 # 重试间隔(毫秒)
|
||||
|
||||
redis:
|
||||
addr: "a0f14e06e1db24e32ae4259046722d25-2145981842.us-west-2.elb.amazonaws.com:6379" # Redis地址
|
||||
password: "S3cure-P@ssw0rd" # Redis密码
|
||||
db: 1 # 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: "" # 设置为钉钉机器人配置的关键词,例如“余额告警”
|
||||
94
etc/config-staging.yaml
Normal file
94
etc/config-staging.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
server:
|
||||
addr: "0.0.0.0"
|
||||
port: 8087
|
||||
|
||||
database:
|
||||
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: "xv5Xesd4ry1_I3hP3xYXNw"
|
||||
redirect_uri: "http://goalfymax-admin.goalfy.ai"
|
||||
scope: "openid profile email"
|
||||
resource_aud: "api://admin"
|
||||
timeout: 30s
|
||||
admin_token: "goalfy_admin_token_1028_v1"
|
||||
|
||||
# OSS 对象存储配置
|
||||
oss:
|
||||
endpoint: "https://staging-biz-goalfylearning.s3.us-west-2.amazonaws.com/" # 可选:S3 兼容端点或阿里云 OSS 域名;AWS S3 可留空
|
||||
region: "us-west-2" # 区域,如 cn-hangzhou / us-west-2
|
||||
access_key_id: "AKIASSWQCE5VWZDYDLMO" # 访问密钥ID
|
||||
access_key_secret: "q2div6qLjfgLYa/u/4f/VxLrgCYN5tDjXcCucLWq" # 访问密钥Secret
|
||||
bucket: "staging-biz-goalfylearning" # 存储桶名称
|
||||
assume_role_arn: "arn:aws:iam::177603749739:role/s3-test" # 可选:用于STS临时凭证
|
||||
presign_url_expire: 30m # 预签名URL有效期
|
||||
|
||||
log:
|
||||
level: "info"
|
||||
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: "a0f14e06e1db24e32ae4259046722d25-2145981842.us-west-2.elb.amazonaws.com:6379" # Redis地址
|
||||
password: "S3cure-P@ssw0rd" # Redis密码
|
||||
db: 2 # 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: "" # 设置为钉钉机器人配置的关键词,例如“余额告警”
|
||||
96
etc/config.yaml
Normal file
96
etc/config.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
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: "https://staging-biz-goalfylearning.s3.us-west-2.amazonaws.com/" # 可选:S3 兼容端点或阿里云 OSS 域名;AWS S3 可留空
|
||||
region: "us-west-2" # 区域,如 cn-hangzhou / us-west-2
|
||||
access_key_id: "AKIASSWQCE5VWZDYDLMO" # 访问密钥ID
|
||||
access_key_secret: "q2div6qLjfgLYa/u/4f/VxLrgCYN5tDjXcCucLWq" # 访问密钥Secret
|
||||
bucket: "staging-biz-goalfylearning" # 存储桶名称
|
||||
assume_role_arn: "arn:aws:iam::177603749739:role/s3-test" # 可选:用于STS临时凭证
|
||||
presign_url_expire: 30m # 预签名URL有效期
|
||||
|
||||
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: "" # 设置为钉钉机器人配置的关键词,例如“余额告警”
|
||||
Reference in New Issue
Block a user