forked from go-eagle/eagle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
quanlong
committed
Mar 10, 2021
1 parent
9c8336d
commit f460e35
Showing
7 changed files
with
124 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,5 +43,4 @@ vendor | |
|
||
# custom | ||
snake | ||
config/config.yaml | ||
config/config.local.yaml | ||
config/config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
app: | ||
Name: snake | ||
Version: 1.0.0 | ||
Port: :8080 | ||
PprofPort: :5555 | ||
Mode: debug # debug, release, test | ||
JwtSecret: JWT_SECRET | ||
JwtTimeout: 86400 | ||
CookieName: jwt-token | ||
ReadTimeout: 5 | ||
WriteTimeout: 5 | ||
SSL: true | ||
CtxDefaultTimeout: 12 | ||
CSRF: true | ||
Debug: false | ||
|
||
log: | ||
name: snake # 应用名称 | ||
writers: file,stdout # 有2个可选项:file,stdout, 可以两者同时选择输出位置,有2个可选项:file,stdout。选择file会将日志记录到logger_file指定的日志文件中,选择stdout会将日志输出到标准输出,当然也可以两者同时选择 | ||
logger_level: DEBUG # 日志级别,DEBUG, INFO, WARN, ERROR, FATAL | ||
logger_file: /tmp/log/snake.log # 日志文件 | ||
logger_warn_file: /tmp/log/snake.wf.log | ||
logger_error_file: /tmp/log/snake.err.log | ||
log_format_text: false # 日志的输出格式,json或者plaintext,目前设置为false即可,暂时也只支持json格式 | ||
log_rolling_policy: daily, # rotate依据,可选的有:daily, hourly。如果选daily(默认)则根据天进行转存,如果是hourly则根据小时进行转存 | ||
log_rotate_date: 1 # rotate转存时间,配合rollingPolicy: daily使用 | ||
log_rotate_size: 1 # rotate转存大小,配合rollingPolicy: size使用 | ||
|
||
logger: | ||
Development: true | ||
DisableCaller: false | ||
DisableStacktrace: false | ||
Encoding: json | ||
Level: info | ||
|
||
mysql: | ||
Name: snake # 数据库名称 | ||
Addr: 127.0.0.1:3306 # 如果是 docker,可以替换为 对应的服务名称,eg: db:3306 | ||
UserName: root | ||
Password: 123456 | ||
ShowLog: true # 是否打印SQL日志 | ||
MaxIdleConn: 10 # 最大闲置的连接数,0意味着使用默认的大小2, 小于0表示不使用连接池 | ||
MaxOpenConn: 60 # 最大打开的连接数, 需要小于数据库配置中的max_connections数 | ||
ConnMaxLifeTime: 60m # 单个连接最大存活时间,建议设置比数据库超时时长(wait_timeout)稍小一些 | ||
|
||
redis: | ||
Addr: 127.0.0.1:6379 | ||
Password: "" | ||
DB: 0 | ||
MinIdleConn: 200 | ||
DialTimeout: 60s | ||
ReadTimeout: 500ms | ||
WriteTimeout: 500ms | ||
PoolSize: 12000 | ||
PoolTimeout: 240 | ||
|
||
cache: | ||
Driver: "redis" # 缓存驱动,可以选memory、redis, 默认redis | ||
Prefix: "snake:" # cache key前缀,一般为项目名称即可 | ||
|
||
email: | ||
Host: SMTP_HOST # SMTP地址 | ||
Port: 25 # 端口 | ||
Username: USER # 用户名 | ||
Password: PASSWORD # 密码 | ||
Name: snake # 发送者名称 | ||
Address: SEND_EMAIL # 发送者邮箱 | ||
ReplyTo: EMAIL # 回复地址 | ||
KeepAlive: 30 # 连接保持时长 | ||
|
||
website: | ||
Name: snake | ||
Domain: http://snake.com | ||
Secret: abcdefg | ||
Static: /data/static | ||
|
||
cookie: | ||
Name: jwt-token | ||
MaxAge: 86400 | ||
Secure: false | ||
HttpOnly: true | ||
Domain: http://snake.com | ||
Secret: abcdefg | ||
|
||
qiniu: | ||
AccessKey: ACCESS_KEY | ||
SecretKey: SECRET_KEY | ||
CdnURL: http://cdn.snake.com | ||
SignatureID: signature_id # 短信签名id | ||
TemplateID: template_id # 模板id | ||
|
||
metrics: | ||
Url: 0.0.0.0:7070 | ||
ServiceName: api | ||
|
||
jaeger: | ||
Host: localhost:6831 | ||
ServiceName: REST_API | ||
LogSpans: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters