2021-04-16 15:10:07 +08:00
|
|
|
|
server:
|
|
|
|
|
|
# debug release test
|
|
|
|
|
|
model: release
|
2023-09-13 19:54:43 +08:00
|
|
|
|
port: 18888
|
2023-11-12 20:14:44 +08:00
|
|
|
|
# 上下文路径, 若设置了该值, 则请求地址为ip:port/context-path
|
|
|
|
|
|
# context-path: /mayfly
|
2021-04-16 15:10:07 +08:00
|
|
|
|
cors: true
|
2021-07-28 18:03:19 +08:00
|
|
|
|
tls:
|
|
|
|
|
|
enable: false
|
|
|
|
|
|
key-file: ./default.key
|
|
|
|
|
|
cert-file: ./default.pem
|
|
|
|
|
|
jwt:
|
2022-07-27 15:36:56 +08:00
|
|
|
|
# jwt key,不设置默认使用随机字符串
|
|
|
|
|
|
key:
|
2021-07-28 18:03:19 +08:00
|
|
|
|
# 过期时间单位分钟
|
|
|
|
|
|
expire-time: 1440
|
2022-08-02 21:44:01 +08:00
|
|
|
|
# 资源密码aes加密key
|
|
|
|
|
|
aes:
|
|
|
|
|
|
key: 1111111111111111
|
2023-10-10 23:21:29 +08:00
|
|
|
|
# 若存在mysql配置,优先使用mysql
|
2021-04-16 15:10:07 +08:00
|
|
|
|
mysql:
|
2023-07-22 20:51:46 +08:00
|
|
|
|
# 自动升级数据库
|
|
|
|
|
|
auto-migration: false
|
2023-07-22 01:43:01 +08:00
|
|
|
|
host: mysql:3306
|
2021-04-16 15:10:07 +08:00
|
|
|
|
username: root
|
|
|
|
|
|
password: 111049
|
2023-07-22 01:43:01 +08:00
|
|
|
|
db-name: mayfly-go
|
2021-07-28 18:03:19 +08:00
|
|
|
|
config: charset=utf8&loc=Local&parseTime=true
|
2021-11-22 16:40:20 +08:00
|
|
|
|
max-idle-conns: 5
|
2023-10-10 23:21:29 +08:00
|
|
|
|
sqlite:
|
|
|
|
|
|
path: ./mayfly-go.sqlite
|
|
|
|
|
|
max-idle-conns: 5
|
2022-12-26 20:53:07 +08:00
|
|
|
|
# 若同时部署多台机器,则需要配置redis信息用于缓存权限码、验证码、公私钥等
|
|
|
|
|
|
# redis:
|
|
|
|
|
|
# host: localhost
|
|
|
|
|
|
# port: 6379
|
2023-06-17 15:15:03 +08:00
|
|
|
|
# password: 111049
|
2022-12-26 20:53:07 +08:00
|
|
|
|
# db: 0
|
2021-07-28 18:03:19 +08:00
|
|
|
|
log:
|
2023-09-02 17:24:18 +08:00
|
|
|
|
# 日志等级, debug, info, warn, error
|
2021-07-28 18:03:19 +08:00
|
|
|
|
level: info
|
2023-09-02 17:24:18 +08:00
|
|
|
|
# 日志格式类型, text/json
|
|
|
|
|
|
type: text
|
|
|
|
|
|
# 是否记录方法调用栈信息
|
|
|
|
|
|
add-source: false
|
2022-12-26 20:53:07 +08:00
|
|
|
|
# file:
|
|
|
|
|
|
# path: ./
|
2023-12-27 22:59:20 +08:00
|
|
|
|
# name: mayfly-go.log
|
|
|
|
|
|
db:
|
|
|
|
|
|
backup-path: ./backup
|
|
|
|
|
|
mysqlutil-path:
|
|
|
|
|
|
mysql: ./mysqlutil/bin/mysql
|
|
|
|
|
|
mysqldump: ./mysqlutil/bin/mysqldump
|
|
|
|
|
|
mysqlbinlog: ./mysqlutil/bin/mysqlbinlog
|
|
|
|
|
|
mariadbutil-path:
|
|
|
|
|
|
mysql: ./mariadbutil/bin/mariadb
|
|
|
|
|
|
mysqldump: ./mariadbutil/bin/mariadb-dump
|
|
|
|
|
|
mysqlbinlog: ./mariadbutil/bin/mariadb-binlog
|