config.yaml 3.5 KB

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