Skip to content

Commit 8eef471

Browse files
committed
fix: Restore config.yaml File
1 parent 1de437d commit 8eef471

File tree

1 file changed

+114
-78
lines changed

1 file changed

+114
-78
lines changed

server/config.yaml

Lines changed: 114 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,77 @@
1-
aliyun-oss:
2-
endpoint: yourEndpoint
3-
access-key-id: yourAccessKeyId
4-
access-key-secret: yourAccessKeySecret
5-
bucket-name: yourBucketName
6-
bucket-url: yourBucketUrl
1+
# Gin-Vue-Admin Global Configuration
2+
3+
# jwt configuration
4+
jwt:
5+
signing-key: 'qmPlus'
6+
expires-time: 604800
7+
buffer-time: 86400
8+
9+
# zap logger configuration
10+
zap:
11+
level: 'info'
12+
format: 'console'
13+
prefix: '[GIN-VUE-ADMIN]'
14+
director: 'log'
15+
link-name: 'latest_log'
16+
show-line: true
17+
encode-level: 'LowercaseColorLevelEncoder'
18+
stacktrace-key: 'stacktrace'
19+
log-in-console: true
20+
21+
# redis configuration
22+
redis:
23+
db: 0
24+
addr: '127.0.0.1:6379'
25+
password: ''
26+
27+
# email configuration
28+
email:
29+
30+
port: 465
31+
32+
host: 'smtp.163.com'
33+
is-ssl: true
34+
secret: 'xxx'
35+
nickname: 'test'
36+
37+
# casbin configuration
38+
casbin:
39+
model-path: './resource/rbac_model.conf'
40+
41+
# system configuration
42+
system:
43+
env: 'public' # Change to "develop" to skip authentication for development mode
44+
addr: 8888
45+
db-type: 'mysql'
46+
oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
47+
use-multipoint: false
48+
49+
# captcha configuration
50+
captcha:
51+
key-long: 6
52+
img-width: 240
53+
img-height: 80
54+
55+
# mysql connect configuration
56+
mysql:
57+
path: ''
58+
config: ''
59+
db-name: ''
60+
username: ''
61+
password: ''
62+
max-idle-conns: 10
63+
max-open-conns: 100
64+
log-mode: false
65+
log-zap: ""
66+
67+
# local configuration
68+
local:
69+
path: 'uploads/file'
70+
71+
# autocode configuration
772
autocode:
873
transfer-restart: true
9-
root: /Users/sliverhorn/Go/src/github.com/flipped-aurora/gin-vue-admin
74+
root: ""
1075
server: /server
1176
server-api: /api/v1
1277
server-initialize: /initialize
@@ -16,80 +81,51 @@ autocode:
1681
server-service: /service
1782
web: /web/src
1883
web-api: /api
84+
web-flow: /view
1985
web-form: /view
2086
web-table: /view
21-
web-flow: /view
22-
captcha:
23-
key-long: 6
24-
img-width: 240
25-
img-height: 80
26-
casbin:
27-
model-path: ./resource/rbac_model.conf
28-
email:
29-
30-
port: 465
31-
32-
host: smtp.163.com
33-
is-ssl: true
34-
secret: xxx
35-
nickname: test
36-
excel:
37-
dir: ./resource/excel/
38-
jwt:
39-
signing-key: qmPlus
40-
expires-time: 604800
41-
buffer-time: 86400
42-
local:
43-
path: uploads/file
44-
mysql:
45-
path: 127.0.0.1:13307
46-
config: charset=utf8mb4&parseTime=True&loc=Local
47-
db-name: gva
48-
username: root
49-
password: gdkid,,..
50-
max-idle-conns: 0
51-
max-open-conns: 0
52-
log-mode: false
53-
log-zap: ""
87+
88+
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
5489
qiniu:
55-
zone: ZoneHuaDong
56-
bucket: ""
57-
img-path: ""
90+
zone: 'ZoneHuaDong'
91+
bucket: ''
92+
img-path: ''
5893
use-https: false
59-
access-key: ""
60-
secret-key: ""
94+
access-key: ''
95+
secret-key: ''
6196
use-cdn-domains: false
62-
redis:
63-
db: 0
64-
addr: 127.0.0.1:6379
65-
password: ""
66-
system:
67-
env: public
68-
addr: 8888
69-
db-type: mysql
70-
oss-type: local
71-
use-multipoint: false
97+
98+
99+
# aliyun oss configuration
100+
aliyun-oss:
101+
endpoint: 'yourEndpoint'
102+
access-key-id: 'yourAccessKeyId'
103+
access-key-secret: 'yourAccessKeySecret'
104+
bucket-name: 'yourBucketName'
105+
bucket-url: 'yourBucketUrl'
106+
107+
# tencent cos configuration
72108
tencent-cos:
73-
bucket: xxxxx-10005608
74-
region: ap-shanghai
75-
secret-id: xxxxxxxx
76-
secret-key: xxxxxxxx
77-
base-url: https://gin.vue.admin
78-
path-prefix: gin-vue-admin
79-
timer:
80-
start: false
81-
spec: '@daily'
82-
detail:
83-
- tableName: sys_operation_records
84-
compareField: created_at
85-
interval: 2160h
86-
zap:
87-
level: info
88-
format: console
89-
prefix: '[GIN-VUE-ADMIN]'
90-
director: log
91-
link-name: latest_log
92-
showLine: true
93-
encode-level: LowercaseColorLevelEncoder
94-
stacktrace-key: stacktrace
95-
log-in-console: true
109+
bucket: 'xxxxx-10005608'
110+
region: 'ap-shanghai'
111+
secret-id: 'xxxxxxxx'
112+
secret-key: 'xxxxxxxx'
113+
base-url: 'https://gin.vue.admin'
114+
path-prefix: 'gin-vue-admin'
115+
116+
# excel configuration
117+
excel:
118+
dir: './resource/excel/'
119+
120+
121+
# timer task db clear table
122+
Timer:
123+
spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron?utm_source=godoc
124+
detail: [
125+
# tableName: 需要清理的表名
126+
# compareField: 需要比较时间的字段
127+
# interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
128+
# 2160h = 24 * 30 * 3 -> 三个月
129+
{ tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
130+
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
131+
]

0 commit comments

Comments
 (0)