server-handle.sh 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#! /bin/bash

rm -f ./config.yaml
# 生成config.yaml文件, 用于docker-compose的使用
touch ./config.yaml
filename="./config.yaml"
cat>"${filename}"<<EOF
# Gin-Vue-Admin Global Configuration

# jwt configuration
jwt:
Sliver_Horn's avatar
Sliver_Horn 已提交
12
  signing-key: 'qmPlus'
m0_50812349's avatar
m0_50812349 已提交
13 14
  expires-time: 604800
  buffer-time: 86400
15

16 17
# zap logger configuration
zap:
18
  level: 'info'
19 20 21
  format: 'console'
  prefix: '[GIN-VUE-ADMIN]'
  director: 'log'
22 23 24 25 26
  link-name: 'latest_log'
  show-line: true
  encode-level: 'LowercaseColorLevelEncoder'
  stacktrace-key: 'stacktrace'
  log-in-console: true
27

Sliver_Horn's avatar
Sliver_Horn 已提交
28 29 30
# redis configuration
redis:
  db: 0
Sliver_Horn's avatar
Sliver_Horn 已提交
31
  addr: '177.7.0.14:6379'
Sliver_Horn's avatar
Sliver_Horn 已提交
32 33 34
  password: ''

# email configuration
35
email:
Sliver_Horn's avatar
Sliver_Horn 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
  to: 'xxx@qq.com'
  port: 465
  from: 'xxx@163.com'
  host: 'smtp.163.com'
  is-ssl: true
  secret: 'xxx'
  nickname: 'test'

# casbin configuration
casbin:
  model-path: './resource/rbac_model.conf'

# system configuration
system:
  env: 'public'  # Change to "develop" to skip authentication for development mode
  addr: 8888
  db-type: 'mysql'
Sliver_Horn's avatar
Sliver_Horn 已提交
53
  oss-type: 'local'
Sliver_Horn's avatar
Sliver_Horn 已提交
54 55 56 57 58 59 60 61 62 63
  use-multipoint: false

# captcha configuration
captcha:
  key-long: 6
  img-width: 240
  img-height: 80

# mysql connect configuration
mysql:
64 65 66 67 68
  path: ''
  config: ''
  db-name: ''
  username: ''
  password: ''
Sliver_Horn's avatar
Sliver_Horn 已提交
69
  max-idle-conns: 10
m0_50812349's avatar
m0_50812349 已提交
70
  max-open-conns: 100
Sliver_Horn's avatar
Sliver_Horn 已提交
71
  log-mode: false
m0_50812349's avatar
m0_50812349 已提交
72
  log-zap: ""
Sliver_Horn's avatar
Sliver_Horn 已提交
73 74 75 76 77 78 79 80 81 82 83 84 85 86

# local configuration
local:
  path: 'uploads/file'

# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
qiniu:
  zone: 'ZoneHuadong'
  bucket: 'qm-plus-img'
  img-path: 'http://qmplusimg.henrongyi.top'
  use-https: false
  access-key: '25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ'
  secret-key: 'pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY'
  use-cdn-domains: false
87 88
EOF