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.

148 lines
4.1 KiB

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