core.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Name: core.api
  2. Host: 0.0.0.0
  3. Port: 9100
  4. Timeout: 6000
  5. Auth:
  6. AccessSecret: jS6VKDtsJf3z1n2VKDtsJf3z1n2
  7. AccessExpire: 259200
  8. Log:
  9. ServiceName: coreApiLogger
  10. Mode: file
  11. Path: /home/data/logs/core/api
  12. Level: info
  13. Compress: false
  14. KeepDays: 7
  15. StackCoolDownMillis: 100
  16. Captcha:
  17. KeyLong: 5
  18. ImgWidth: 240
  19. ImgHeight: 80
  20. Driver: digit
  21. DatabaseConf:
  22. Type: mysql
  23. Host: 127.0.0.1
  24. Port: 3306
  25. DBName: simple_admin
  26. Username: # set your username
  27. Password: # set your password
  28. MaxOpenConn: 100
  29. SSLMode: disable
  30. CacheTime: 5
  31. ProjectConf:
  32. DefaultRoleId: 1 # default role id when register
  33. DefaultDepartmentId: 1 # default department id when register
  34. DefaultPositionId: 1 # default position id when register
  35. EmailCaptchaExpiredTime: 600 # the expired time for email captcha
  36. SmsTemplateId: xxx # The template id for sms
  37. SmsAppId: xxx # the app id for sms
  38. SmsSignName: xxx # the signature name of sms
  39. SmsParamsType: json # the type of sms param, support json and array
  40. RegisterVerify: captcha # register captcha type, support captcha, email, sms, sms_or_email
  41. LoginVerify: captcha # login captcha type, support captcha, email, sms, sms_or_email, all
  42. ResetVerify: email # reset captcha type, support email, sms, sms_or_email
  43. AllowInit: true # if false, ban initialization
  44. RefreshTokenPeriod: 24 # refresh token valid period, unit: hour | 刷新 token 的有效期,单位:小时
  45. AccessTokenPeriod: 1 # access token valid period, unit: hour | 短期 token 的有效期,单位:小时
  46. Prometheus:
  47. Host: 0.0.0.0
  48. Port: 4000
  49. Path: /metrics
  50. CasbinConf:
  51. ModelText: |
  52. [request_definition]
  53. r = sub, obj, act
  54. [policy_definition]
  55. p = sub, obj, act
  56. [role_definition]
  57. g = _, _
  58. [policy_effect]
  59. e = some(where (p.eft == allow))
  60. [matchers]
  61. m = r.sub == p.sub && keyMatch2(r.obj,p.obj) && r.act == p.act
  62. I18nConf:
  63. Dir: # set the path of locale if you need to load files
  64. CROSConf:
  65. Address: '*' # if it is *, allow all ip and address. e.g. http://example.com
  66. RedisConf:
  67. Host: 127.0.0.1:6379
  68. Db: 0
  69. CoreRpc:
  70. Target: k8s://default/core-rpc-svc:9101
  71. Enabled: true
  72. JobRpc:
  73. Target: k8s://default/job-rpc-svc:9105
  74. Enabled: false
  75. McmsRpc:
  76. Target: k8s://default/mcms-rpc-svc:9106
  77. Enabled: false
  78. Timeout: 5000
  79. # Tracing Analysis
  80. #Telemetry:
  81. # Name: core-api
  82. # Endpoint: localhost:4317
  83. # Sampler: 1.0
  84. # Batcher: otlpgrpc # grpc