config.docker.yaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. # 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: "[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/dept
  110. store-path: uploads/dept
  111. # autocode configuration
  112. autocode:
  113. transfer-restart: true
  114. # root 自动适配项目根目录
  115. # 请不要手动配置,他会在项目加载的时候识别出根路径
  116. root: ""
  117. server: /server
  118. server-plug: /plugin/%s
  119. server-api: /api/v1/%s
  120. server-initialize: /initialize
  121. server-model: /model/%s
  122. server-request: /model/%s/request/
  123. server-router: /router/%s
  124. server-service: /service/%s
  125. web: /web/src
  126. web-api: /api
  127. web-form: /view
  128. web-table: /view
  129. # qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址)
  130. qiniu:
  131. zone: ZoneHuaDong
  132. bucket: ""
  133. img-path: ""
  134. use-https: false
  135. access-key: ""
  136. secret-key: ""
  137. use-cdn-domains: false
  138. # aliyun oss configuration
  139. aliyun-oss:
  140. endpoint: yourEndpoint
  141. access-key-id: yourAccessKeyId
  142. access-key-secret: yourAccessKeySecret
  143. bucket-name: yourBucketName
  144. bucket-url: yourBucketUrl
  145. base-path: yourBasePath
  146. # tencent cos configuration
  147. tencent-cos:
  148. bucket: xxxxx-10005608
  149. region: ap-shanghai
  150. secret-id: your-secret-id
  151. secret-key: your-secret-key
  152. base-url: https://gin.vue.admin
  153. path-prefix: server
  154. # aws s3 configuration (minio compatible)
  155. aws-s3:
  156. bucket: xxxxx-10005608
  157. region: ap-shanghai
  158. endpoint: ""
  159. s3-force-path-style: false
  160. disable-ssl: false
  161. secret-id: your-secret-id
  162. secret-key: your-secret-key
  163. base-url: https://gin.vue.admin
  164. path-prefix: server
  165. # huawei obs configuration
  166. hua-wei-obs:
  167. path: you-path
  168. bucket: you-bucket
  169. endpoint: you-endpoint
  170. access-key: you-access-key
  171. secret-key: you-secret-key
  172. # excel configuration
  173. excel:
  174. dir: ./resource/excel/
  175. # timer task db clear table
  176. Timer:
  177. start: true
  178. spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
  179. detail:
  180. - tableName: sys_operation_records
  181. compareField: created_at
  182. interval: 2160h
  183. - tableName: jwt_blacklists
  184. compareField: created_at
  185. interval: 168h
  186. # 跨域配置
  187. # 需要配合 server/initialize/router.go -> `Router.Use(middleware.CorsByRules())` 使用
  188. cors:
  189. mode: whitelist # 放行模式: allow-all, 放行全部; whitelist, 白名单模式, 来自白名单内域名的请求添加 cors 头; strict-whitelist 严格白名单模式, 白名单外的请求一律拒绝
  190. whitelist:
  191. - allow-origin: example1.com
  192. allow-headers: content-type
  193. allow-methods: GET, POST
  194. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  195. allow-credentials: true # 布尔值
  196. - allow-origin: example2.com
  197. allow-headers: content-type
  198. allow-methods: GET, POST
  199. expose-headers: Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type
  200. allow-credentials: true # 布尔值