feature: mongoDB 支持 (#1565)

* feature: mongoDB 支持

* update: 修改错误mongo索引示例

* update: 在system添加use-mongo 开关开启或者关闭mongo
This commit is contained in:
SliverHorn
2023-10-14 13:59:30 +08:00
committed by GitHub
parent b3dbb8d4be
commit 232aaad090
12 changed files with 345 additions and 1 deletions

View File

@@ -23,6 +23,22 @@ redis:
addr: 177.7.0.14:6379
password: ""
# mongo configuration
mongo:
coll: ''
options: ''
database: ''
username: ''
password: ''
min-pool-size: 0
max-pool-size: 100
socket-timeout-ms: 0
connect-timeout-ms: 0
is-zap: false
hosts:
- host: ''
port: ''
# email configuration
email:
to: xxx@qq.com
@@ -40,6 +56,7 @@ system:
db-type: mysql
oss-type: local # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
use-redis: false # 使用redis
use-mongo: false # 使用mongo
use-multipoint: false
# IP限制次数 一个小时15000次
iplimit-count: 15000