-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
148 lines (135 loc) · 3.44 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# github.com/flipped-aurora/gin-vue-admin/server Global Configuration
# jwt configuration
jwt:
signing-key: freebns
expires-time: 7d
buffer-time: 1d
issuer: freebns
# zap logger configuration
zap:
level: info
format: console
prefix: "[free-bns]"
director: storage/logs
show-line: true
encode-level: LowercaseColorLevelEncoder
stacktrace-key: stacktrace
log-in-console: true
# redis configuration
redis:
db: 0
addr: 127.0.0.1:6379
password:
# email configuration
email:
port: 465
from: [email protected]
host: smtp.163.com
is-ssl: true
secret: ZXENDGUOMAZDTGIH
nickname: free-bns中文社区
# system configuration
system:
env: develop1 # Change to "develop" to skip authentication for development mode
addr: 8080
host: http://localhost:8080
db-type: mysql
oss-type: local # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
use-redis: true # 使用redis
use-multipoint: false
# IP限制次数 一个小时15000次
iplimit-count: 1500
# IP限制一个小时
iplimit-time: 3600
# 路由全局前缀
router-prefix: "/"
# captcha configuration
captcha:
key-long: 6
img-width: 240
img-height: 80
open-captcha: 0 # 0代表一直开启,大于0代表限制次数
open-captcha-timeout: 3600 # open-captcha大于0时才生效
is-email-or-pic: 0 # 是否开启邮箱或图片验证码 0 全部 1 仅图片验证码 2 仅邮箱验证码
Database:
LogZap: true
Master:
DBType: mysql
DBName: freebns
UserName: root
Password: root
Host: 127.0.0.1:3306
TablePrefix: bbs_
Charset: utf8mb4
ParseTime: true
MaxIdleConns: 10
MaxOpenConns: 30
Slave:
DBType: mysql
DBName: ""
UserName: ""
Password: ""
Host: ""
TablePrefix: ""
Charset: utf8mb4
ParseTime: true
MaxIdleConns: 10
MaxOpenConns: 30
# local configuration
local:
path: storage/uploads/file
store-path: storage/uploads/file
upload-path: https://www.5ixiaohui.com/upload
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
qiniu:
zone: ZoneHuaDong
bucket: "freebns"
img-path: "https://www.5ixiaohui.com"
use-https: true
access-key: "DQy3SgdA_8tUtlWd9mksE7yJSQakFw0WHvHJTXGv"
secret-key: "876i6rFFeIWwSagcOaMkA6KjVALe_Ui_NdrlmRm1"
use-cdn-domains: true
# aliyun oss configuration
aliyun-oss:
endpoint: yourEndpoint
access-key-id: yourAccessKeyId
access-key-secret: yourAccessKeySecret
bucket-name: yourBucketName
bucket-url: yourBucketUrl
base-path: yourBasePath
# tencent cos configuration
tencent-cos:
bucket: xxxxx-10005608
region: ap-shanghai
secret-id: your-secret-id
secret-key: your-secret-key
base-url: https://gin.vue.admin
path-prefix: github.com/flipped-aurora/gin-vue-admin/server
# aws s3 configuration (minio compatible)
aws-s3:
bucket: xxxxx-10005608
region: ap-shanghai
endpoint: ""
s3-force-path-style: false
disable-ssl: false
secret-id: your-secret-id
secret-key: your-secret-key
base-url: https://gin.vue.admin
path-prefix: github.com/flipped-aurora/gin-vue-admin/server
# huawei obs configuration
hua-wei-obs:
path: you-path
bucket: you-bucket
endpoint: you-endpoint
access-key: you-access-key
secret-key: you-secret-key
# excel configuration
excel:
dir: ./storage/files/excel/
elasticsearch:
host: 127.0.0.1
port: 9200
user:
password:
enable: false