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. # 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. show-line: true
  14. encode-level: 'LowercaseColorLevelEncoder'
  15. stacktrace-key: 'stacktrace'
  16. log-in-console: true
  17. # redis configuration
  18. redis:
  19. db: 0
  20. addr: '127.0.0.1:6379'
  21. password: ''
  22. # email configuration
  23. email:
  24. to: 'xxx@qq.com'
  25. port: 465
  26. from: 'xxx@163.com'
  27. host: 'smtp.163.com'
  28. is-ssl: true
  29. secret: 'xxx'
  30. nickname: 'test'
  31. # casbin configuration
  32. casbin:
  33. model-path: './resource/rbac_model.conf'
  34. # system configuration
  35. system:
  36. env: 'public' # Change to "develop" to skip authentication for development mode
  37. addr: 8888
  38. db-type: 'mysql'
  39. oss-type: 'local' # 控制oss选择走本期还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
  40. use-multipoint: false
  41. # IP限制次数 一个小时15000次
  42. iplimit-count: 15000
  43. # IP限制一个小时
  44. iplimit-time: 3600
  45. # captcha configuration
  46. captcha:
  47. key-long: 6
  48. img-width: 240
  49. img-height: 80
  50. # mysql connect configuration
  51. # 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/first)
  52. mysql:
  53. path: ''
  54. config: ''
  55. db-name: ''
  56. username: ''
  57. password: ''
  58. max-idle-conns: 10
  59. max-open-conns: 100
  60. log-mode: false
  61. log-zap: ""
  62. # local configuration
  63. local:
  64. path: 'uploads/file'
  65. # autocode configuration
  66. autocode:
  67. transfer-restart: true
  68. # root 自动适配项目根目录
  69. # 请不要手动配置,他会在项目加载的时候识别出根路径
  70. root: ""
  71. server: /server
  72. server-api: /api/v1/autocode
  73. server-initialize: /initialize
  74. server-model: /model/autocode
  75. server-request: /model/autocode/request/
  76. server-router: /router/autocode
  77. server-service: /service/autocode
  78. web: /web/src
  79. web-api: /api
  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: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
  121. #{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
  122. ]