config.docker.yaml 5.0 KB

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