Files
eagle/config/config.docker.yaml
2021-10-30 09:43:58 +08:00

152 lines
3.9 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.

app:
Name: eagle
Version: 1.0.0
PprofPort: :5555
Mode: debug # debug, release, test
JwtSecret: JWT_SECRET
JwtTimeout: 86400
CookieName: jwt-token
SSL: true
CtxDefaultTimeout: 12
CSRF: true
Debug: false
Http:
Addr: :8080
ReadTimeout: 3s
WriteTimeout: 3s
Grpc:
Addr: :9090
ReadTimeout: 3s
WriteTimeout: 3s
logger:
Development: true
DisableCaller: false
DisableStacktrace: false
Encoding: json
Level: info
Name: eagle
Writers: file,stdout
LoggerFile: /tmp/log/eagle.log
LoggerWarnFile: /tmp/log/eagle.wf.log
LoggerErrorFile: /tmp/log/eagle.err.log
LogRollingPolicy: daily
LogRotateDate: 1
LogRotateSize: 1
LogBackupCount: 7
orm:
Name: eagle # 数据库名称
Addr: db:3306 # 如果是 docker,可以替换为 对应的服务名称eg: db:3306
UserName: root
Password: root
ShowLog: true # 是否打印SQL日志
MaxIdleConn: 10 # 最大闲置的连接数0意味着使用默认的大小2 小于0表示不使用连接池
MaxOpenConn: 60 # 最大打开的连接数, 需要小于数据库配置中的max_connections数
ConnMaxLifeTime: 60m # 单个连接最大存活时间,建议设置比数据库超时时长(wait_timeout)稍小一些
mysql:
Dsn: "root:123456@tcp(localhost:3306)/eagle?timeout=2s&readTimeout=5s&writeTimeout=5s&parseTime=true&loc=Local&charset=utf8,utf8mb4"
ShowLog: true # 是否打印SQL日志
MaxIdleConn: 10 # 最大闲置的连接数0意味着使用默认的大小2 小于0表示不使用连接池
MaxOpenConn: 60 # 最大打开的连接数, 需要小于数据库配置中的max_connections数
ConnMaxLifeTime: 4000 # 单个连接最大存活时间,建议设置比数据库超时时长(wait_timeout)稍小一些
QueryTimeout: 200
ExecTimeout: 200
TranTimeout: 200
Braker: # 熔断器配置
window: 3s
sleep: 100ms
bucket: 100
ratio: 0.5
request: 100
redis:
Addr: redis:6379
Password: ""
DB: 0
MinIdleConn: 200
DialTimeout: 60s
ReadTimeout: 500ms
WriteTimeout: 500ms
PoolSize: 12000
PoolTimeout: 240
cache:
Driver: "redis" # 缓存驱动可以选memory、redis, 默认redis
Prefix: "eagle:" # cache key前缀一般为项目名称即可
email:
Host: SMTP_HOST # SMTP地址
Port: 25 # 端口
Username: USER # 用户名
Password: PASSWORD # 密码
Name: eagle # 发送者名称
Address: SEND_EMAIL # 发送者邮箱
ReplyTo: EMAIL # 回复地址
KeepAlive: 30 # 连接保持时长
web:
Name: eagle
Domain: http://eagle.com
Secret: abcdefg
Static: /data/static
cookie:
Name: jwt-token
MaxAge: 86400
Secure: false
HttpOnly: true
Domain: http://eagle.com
Secret: abcdefg
qiniu:
AccessKey: ACCESS_KEY
SecretKey: SECRET_KEY
CdnURL: http://cdn.eagle.com
SignatureID: signature_id # 短信签名id
TemplateID: template_id # 模板id
metrics:
Url: 0.0.0.0:7070
ServiceName: api
jaeger:
Host: jaeger:6831
ServiceName: REST_API
LogSpans: false
MongoDB:
URI: "mongodb://localhost:27017"
User: "admin"
Password: "admin"
DB: "eagle"
trace:
# trace config
ServiceName: "eagle"
TraceAgent: "jaeger"
OpenDebug: "false"
Zipkin:
HTTPEndpoint: "http://127.0.0.1:9411/api/v2/spans"
SameSpan: false
ID128Bit: true
SampleRate: "1.0"
Jaeger:
SamplingServerURL: "http://127.0.0.1:5778/sampling"
SamplingType: "const"
SamplingParam: "1.0"
LocalAgentHostPort: "127.0.0.1:6831"
Propagation: "jaeger"
Gen128Bit: true
TraceContextHeaderName: "uber-trace-id"
CollectorEndpoint: ""
CollectorUser: ""
CollectorPassword: ""
# Elastic, only useful when TraceAgent is elastic
Elastic:
ServerURL: "http://127.0.0.1:8200"
SecretToken: ""