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'
13

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

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

# email configuration
33
email:
Sliver_Horn's avatar
Sliver_Horn 已提交
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
  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 已提交
51
  oss-type: 'local'
Sliver_Horn's avatar
Sliver_Horn 已提交
52 53 54 55 56 57 58 59 60 61
  use-multipoint: false

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

# mysql connect configuration
mysql:
Sliver_Horn's avatar
Sliver_Horn 已提交
62
  path: '177.7.0.13:3306'
Sliver_Horn's avatar
Sliver_Horn 已提交
63 64 65
  config: 'charset=utf8mb4&parseTime=True&loc=Local'
  db-name: 'qmPlus'
  username: 'root'
Sliver_Horn's avatar
Sliver_Horn 已提交
66
  password: 'Aa@6447985'
Sliver_Horn's avatar
Sliver_Horn 已提交
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
  max-idle-conns: 10
  max-open-conns: 10
  log-mode: false

# 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
84 85
EOF