config.docker.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. # github.com/flipped-aurora/gin-vue-admin/server Global Configuration
  2. # jwt configuration
  3. jwt:
  4. signing-key: qmPlus
  5. expires-time: 7d
  6. buffer-time: 1d
  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: redis: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. # system configuration
  33. system:
  34. env: public # Change to "develop" to skip authentication for development mode
  35. addr: 8888
  36. db-type: mysql
  37. oss-type: local # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
  38. use-redis: false # 使用redis
  39. use-multipoint: false
  40. # IP限制次数 一个小时15000次
  41. iplimit-count: 15000
  42. # IP限制一个小时
  43. iplimit-time: 3600
  44. # captcha configuration
  45. captcha:
  46. key-long: 6
  47. img-width: 240
  48. img-height: 80
  49. open-captcha: 0 # 0代表一直开启,大于0代表限制次数
  50. open-captcha-timeout: 3600 # open-captcha大于0时才生效
  51. # mysql connect configuration
  52. # 未初始化之前请勿手动修改数据库信息!!!如果一定要手动初始化请看(https://gin-vue-admin.com/docs/first_master)
  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://gin-vue-admin.com/docs/first_master)
  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. db-list:
  78. - disable: true # 是否禁用
  79. type: "" # 数据库的类型,目前支持mysql、pgsql
  80. alias-name: "" # 数据库的名称,注意: alias-name 需要在db-list中唯一
  81. path: ""
  82. port: ""
  83. config: ""
  84. db-name: ""
  85. username: ""
  86. password: ""
  87. max-idle-conns: 10
  88. max-open-conns: 100
  89. log-mode: ""
  90. log-zap: false
  91. # local configuration
  92. local:
  93. path: uploads/file
  94. store-path: uploads/file
  95. # autocode configuration
  96. autocode:
  97. transfer-restart: true
  98. # root 自动适配项目根目录
  99. # 请不要手动配置,他会在项目加载的时候识别出根路径
  100. root: ""
  101. server: /server
  102. server-plug: /plugin/%s
  103. server-api: /api/v1/%s
  104. server-initialize: /initialize
  105. server-model: /model/%s
  106. server-request: /model/%s/request/
  107. server-router: /router/%s
  108. server-service: /service/%s
  109. web: /web/src
  110. web-api: /api
  111. web-form: /view
  112. web-table: /view
  113. # qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
  114. qiniu:
  115. zone: ZoneHuaDong
  116. bucket: ""
  117. img-path: ""
  118. use-https: false
  119. access-key: ""
  120. secret-key: ""
  121. use-cdn-domains: false
  122. # aliyun oss configuration
  123. aliyun-oss:
  124. endpoint: yourEndpoint
  125. access-key-id: yourAccessKeyId
  126. access-key-secret: yourAccessKeySecret
  127. bucket-name: yourBucketName
  128. bucket-url: yourBucketUrl
  129. base-path: yourBasePath
  130. # tencent cos configuration
  131. tencent-cos:
  132. bucket: xxxxx-10005608
  133. region: ap-shanghai
  134. secret-id: your-secret-id
  135. secret-key: your-secret-key
  136. base-url: https://gin.vue.admin
  137. path-prefix: github.com/flipped-aurora/gin-vue-admin/server
  138. # aws s3 configuration (minio compatible)
  139. aws-s3:
  140. bucket: xxxxx-10005608
  141. region: ap-shanghai
  142. endpoint: ""
  143. s3-force-path-style: false
  144. disable-ssl: false
  145. secret-id: your-secret-id
  146. secret-key: your-secret-key
  147. base-url: https://gin.vue.admin
  148. path-prefix: github.com/flipped-aurora/gin-vue-admin/server
  149. # huawei obs configuration
  150. hua-wei-obs:
  151. path: you-path
  152. bucket: you-bucket
  153. endpoint: you-endpoint
  154. access-key: you-access-key
  155. secret-key: you-secret-key
  156. # excel configuration
  157. excel:
  158. dir: ./resource/excel/
  159. # timer task db clear table
  160. Timer:
  161. start: true
  162. spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
  163. detail:
  164. - tableName: sys_operation_records
  165. compareField: created_at
  166. interval: 2160h
  167. - tableName: jwt_blacklists
  168. compareField: created_at
  169. interval: 168h
  170. # 跨域配置
  171. # 需要配合 server/initialize/router.go -> `Router.Use(middleware.CorsByRules())` 使用
  172. cors:
  173. mode: whitelist # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
  174. whitelist:
  175. - allow-origin: example1.com
  176. allow-headers: content-type
  177. allow-methods: GET, POST
  178. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  179. allow-credentials: true # 布尔值
  180. - allow-origin: example2.com
  181. allow-headers: content-type
  182. allow-methods: GET, POST
  183. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  184. allow-credentials: true # 布尔值