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.

140 lines
3.5 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. config: ''
  56. db-name: ''
  57. username: ''
  58. password: ''
  59. max-idle-conns: 10
  60. max-open-conns: 100
  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. # 请不要手动配置,他会在项目加载的时候识别出根路径
  71. root: ""
  72. server: /server
  73. server-api: /api/v1/autocode
  74. server-initialize: /initialize
  75. server-model: /model/autocode
  76. server-request: /model/autocode/request/
  77. server-router: /router/autocode
  78. server-service: /service/autocode
  79. web: /web/src
  80. web-api: /api
  81. web-form: /view
  82. web-table: /view
  83. # qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
  84. qiniu:
  85. zone: 'ZoneHuaDong'
  86. bucket: ''
  87. img-path: ''
  88. use-https: false
  89. access-key: ''
  90. secret-key: ''
  91. use-cdn-domains: false
  92. # aliyun oss configuration
  93. aliyun-oss:
  94. endpoint: 'yourEndpoint'
  95. access-key-id: 'yourAccessKeyId'
  96. access-key-secret: 'yourAccessKeySecret'
  97. bucket-name: 'yourBucketName'
  98. bucket-url: 'yourBucketUrl'
  99. base-path: 'yourBasePath'
  100. # tencent cos configuration
  101. tencent-cos:
  102. bucket: 'xxxxx-10005608'
  103. region: 'ap-shanghai'
  104. secret-id: 'xxxxxxxx'
  105. secret-key: 'xxxxxxxx'
  106. base-url: 'https://gin.vue.admin'
  107. path-prefix: 'github.com/flipped-aurora/gin-vue-admin/server'
  108. # excel configuration
  109. excel:
  110. dir: './resource/excel/'
  111. # timer task db clear table
  112. Timer:
  113. start: true
  114. spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
  115. detail: [
  116. # tableName: 需要清理的表名
  117. # compareField: 需要比较时间的字段
  118. # interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
  119. # 2160h = 24 * 30 * 3 -> 三个月
  120. { tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
  121. { tableName: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
  122. #{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
  123. ]