You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
3.9 KiB

  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. issuer: 'qmPlus'
  8. # zap logger configuration
  9. zap:
  10. level: 'info'
  11. format: 'console'
  12. prefix: '[github.com/flipped-aurora/gin-vue-admin/server]'
  13. director: '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: 'xxx@qq.com'
  26. port: 465
  27. from: 'xxx@163.com'
  28. host: 'smtp.163.com'
  29. is-ssl: true
  30. secret: 'xxx'
  31. nickname: 'test'
  32. # casbin configuration
  33. casbin:
  34. model-path: './resource/rbac_model.conf'
  35. # system configuration
  36. system:
  37. env: 'public' # Change to "develop" to skip authentication for development mode
  38. addr: 8888
  39. db-type: 'mysql'
  40. oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
  41. use-multipoint: false
  42. # IP限制次数 一个小时15000次
  43. iplimit-count: 15000
  44. # IP限制一个小时
  45. iplimit-time: 3600
  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: ''
  55. port: ''
  56. config: ''
  57. db-name: ''
  58. username: ''
  59. password: ''
  60. max-idle-conns: 10
  61. max-open-conns: 100
  62. log-mode: ""
  63. log-zap: false
  64. # pgsql connect configuration
  65. # 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/first)
  66. pgsql:
  67. path: ''
  68. port: ''
  69. config: ''
  70. db-name: ''
  71. username: ''
  72. password: ''
  73. max-idle-conns: 10
  74. max-open-conns: 100
  75. log-mode: ""
  76. log-zap: false
  77. # local configuration
  78. local:
  79. path: 'uploads/file'
  80. # autocode configuration
  81. autocode:
  82. transfer-restart: true
  83. # root 自动适配项目根目录
  84. # 请不要手动配置,他会在项目加载的时候识别出根路径
  85. root: ""
  86. server: /server
  87. server-api: /api/v1/autocode
  88. server-initialize: /initialize
  89. server-model: /model/autocode
  90. server-request: /model/autocode/request/
  91. server-router: /router/autocode
  92. server-service: /service/autocode
  93. web: /web/src
  94. web-api: /api
  95. web-form: /view
  96. web-table: /view
  97. # qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
  98. qiniu:
  99. zone: 'ZoneHuaDong'
  100. bucket: ''
  101. img-path: ''
  102. use-https: false
  103. access-key: ''
  104. secret-key: ''
  105. use-cdn-domains: false
  106. # aliyun oss configuration
  107. aliyun-oss:
  108. endpoint: 'yourEndpoint'
  109. access-key-id: 'yourAccessKeyId'
  110. access-key-secret: 'yourAccessKeySecret'
  111. bucket-name: 'yourBucketName'
  112. bucket-url: 'yourBucketUrl'
  113. base-path: 'yourBasePath'
  114. # tencent cos configuration
  115. tencent-cos:
  116. bucket: 'xxxxx-10005608'
  117. region: 'ap-shanghai'
  118. secret-id: 'xxxxxxxx'
  119. secret-key: 'xxxxxxxx'
  120. base-url: 'https://gin.vue.admin'
  121. path-prefix: 'github.com/flipped-aurora/gin-vue-admin/server'
  122. # excel configuration
  123. excel:
  124. dir: './resource/excel/'
  125. # timer task db clear table
  126. Timer:
  127. start: true
  128. spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
  129. detail: [
  130. # tableName: 需要清理的表名
  131. # compareField: 需要比较时间的字段
  132. # interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
  133. # 2160h = 24 * 30 * 3 -> 三个月
  134. { tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
  135. { tableName: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
  136. #{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
  137. ]