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.

137 lines
3.4 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. 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: '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. # captcha configuration
  43. captcha:
  44. key-long: 6
  45. img-width: 240
  46. img-height: 80
  47. # mysql connect configuration
  48. # 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://www.github.com/flipped-aurora/gin-vue-admin/server.com/docs/first)
  49. mysql:
  50. path: ''
  51. config: ''
  52. db-name: ''
  53. username: ''
  54. password: ''
  55. max-idle-conns: 10
  56. max-open-conns: 100
  57. log-mode: false
  58. log-zap: ""
  59. # local configuration
  60. local:
  61. path: 'uploads/file'
  62. # autocode configuration
  63. autocode:
  64. transfer-restart: true
  65. # root 自动适配项目根目录
  66. # 请不要手动配置,他会在项目加载的时候识别出根路径
  67. root: ""
  68. server: /server
  69. server-api: /api/v1/autocode
  70. server-initialize: /initialize
  71. server-model: /model/autocode
  72. server-request: /model/autocode/request/
  73. server-router: /router/autocode
  74. server-service: /service/autocode
  75. web: /web/src
  76. web-api: /api
  77. web-form: /view
  78. web-table: /view
  79. # qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
  80. qiniu:
  81. zone: 'ZoneHuaDong'
  82. bucket: ''
  83. img-path: ''
  84. use-https: false
  85. access-key: ''
  86. secret-key: ''
  87. use-cdn-domains: false
  88. # aliyun oss configuration
  89. aliyun-oss:
  90. endpoint: 'yourEndpoint'
  91. access-key-id: 'yourAccessKeyId'
  92. access-key-secret: 'yourAccessKeySecret'
  93. bucket-name: 'yourBucketName'
  94. bucket-url: 'yourBucketUrl'
  95. base-path: 'yourBasePath'
  96. # tencent cos configuration
  97. tencent-cos:
  98. bucket: 'xxxxx-10005608'
  99. region: 'ap-shanghai'
  100. secret-id: 'xxxxxxxx'
  101. secret-key: 'xxxxxxxx'
  102. base-url: 'https://gin.vue.admin'
  103. path-prefix: 'github.com/flipped-aurora/gin-vue-admin/server'
  104. # excel configuration
  105. excel:
  106. dir: './resource/excel/'
  107. # timer task db clear table
  108. Timer:
  109. start: true
  110. spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
  111. detail: [
  112. # tableName: 需要清理的表名
  113. # compareField: 需要比较时间的字段
  114. # interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
  115. # 2160h = 24 * 30 * 3 -> 三个月
  116. { tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
  117. { tableName: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
  118. #{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
  119. ]