Files
mayfly-go/server/config.yml.example

58 lines
1.5 KiB
Plaintext
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:
# en,zh-cn, 默认zh-cn
lang: zh-cn
# debug release test
model: release
port: 18888
# 上下文路径, 若设置了该值, 则请求地址为ip:port/context-path
# context-path: /mayfly
cors: true
tls:
enable: false
key-file: ./default.key
cert-file: ./default.pem
jwt:
# jwt key不设置默认使用随机字符串
key: 333333000000
# accessToken过期时间单位分钟
expire-time: 720
# refreshToken过期时间单位分钟
refresh-token-expire-time: 4320
# 资源密码aes加密key
aes:
key: 1111111111111111
# 若存在mysql配置优先使用mysql
mysql:
host: mysql:3306
username: root
password: 111049
db-name: mayfly-go
config: charset=utf8&loc=Local&parseTime=true
max-idle-conns: 5
sqlite:
path: ./mayfly-go.sqlite
max-idle-conns: 5
# 若同时部署多台机器则需要配置redis信息用于缓存权限码、验证码、公私钥等
# redis:
# host: localhost
# port: 6379
# password: 111049
# db: 0
log:
# 日志等级, debug, info, warn, error
level: info
# 日志格式类型, text/json
type: text
# 是否记录方法调用栈信息
add-source: false
# 日志文件配置
# file:
# path: ./log
# name: mayfly-go.log
# # 日志文件的最大大小(以兆字节为单位)。当日志文件大小达到该值时,将触发切割操作
# max-size: 500
# # 根据文件名中的时间戳,设置保留旧日志文件的最大天数
# max-age: 60
# # 是否使用 gzip 压缩方式压缩轮转后的日志文件
# compress: true