Skip to content

Latest commit

 

History

History
145 lines (73 loc) · 3.36 KB

2.Configuration.md

File metadata and controls

145 lines (73 loc) · 3.36 KB

配置参数说明

2.1、SharedConfiguration

2.1.1、log4net.config

log4net日志参数配置

2.1.2、NGPSettiings.{Development}.json 通用开发环境配置

  • HostServer : 网关服务地址

  • IdentityServer : 认证服务地址

  • ConnectionStrings : 开发环境数据库链接字符串配置

  • HasAppMetrics : 是否启用环境监控

  • InfluxDb : influxdb配置

  • GlobalConfiguration : 全局配置

    • UseServiceDiscovery : 是否启用服务发现
  • HealthChecksUI : 健康检查配置

    • HealthChecks : 检查列表

      • Name : 检查名称

      • Uri : 检查URL

    • EvaluationTimeOnSeconds : 检查间隔

    • MinimumSecondsBetweenFailureNotifications :最小异常时间

2.2、NGP.ApiGateway.Base

2.2.1、appsettings.json

  • ApiScopes : 认证允许的资源范围(因为是网关,所以包含所有服务)

  • AppMetrics : 监控参数配置

2.2.2、ocelot.Development.json 网关开发环境配置

  • ReRoutes : 网关请求映射配置

    • DownstreamPathTemplate : 下位请求url路径配置

    • DownstreamScheme : 下位请求scheme配置

    • DownstreamHostAndPorts : 下位请求地址配置

    • UpstreamPathTemplate : 上位请求url路径配置

    • UpstreamHttpMethod : 上位请求方法配置

2.2.3、ocelot.json 网关部署环境配置

  • ReRoutes : 网关请求映射配置

    • DownstreamPathTemplate : 下位请求url路径配置

    • DownstreamScheme : 下位请求scheme配置

    • ServiceName : 服务发现名称

    • UpstreamPathTemplate : 上位请求url路径配置

    • UpstreamHttpMethod : 上位请求方法配置

    • AuthenticationOptions : 认证选项

      • AuthenticationProviderKey : 认证类型

      • AllowedScopes : 允许范围,默认*

2.3、NGP.DebtBase/Global/XXX.Api

2.3.1、appsettings.json

  • ApiConfig : api 配置

    • Audience : 在identity设定的api资源标识

    • DocName : swagger文档重命名标签

  • AppMetrics : 监控参数配置

2.4、NGP.Identity.Api

2.4.1、appsettings.json

  • ApiConfig : api 配置

    • Audience : 在identity设定的api资源标识

    • DocName : swagger文档重命名标签

  • AppMetrics : 监控参数配置

  • SigninKeyCredentials : 签名加密配置

    • KeyType : key类型

    • KeyFilePassword : 签名密码

2.5、docker-compose

2.5.1、lgd-variables.env 部署环境变量配置

  • ConnectionStrings__DbConnection : 数据库链接字符串

  • MachineHealthCheck__MemoryThreshold : 内存阈值

  • GlobalConfiguration__UseServiceDiscovery : 是否启用服务发现

  • GlobalConfiguration__ServiceDiscoveryProvider__Host : 服务发现提供者地址

  • GlobalConfiguration__ServiceDiscoveryProvider__Port : 服务发现提供者端口

  • GlobalConfiguration__ServiceDiscoveryProvider__Type : 服务发现提供类型

  • GlobalConfiguration__LoadBalancer : 负载均衡策略

  • HasAppMetrics : 是否启用应用监控

  • HostServer : 网关地址

  • IdentityServer : 身份认证地址

  • ConsulServiceConfig__xxx__serviceDiscoveryAddress : xxx服务发现地址

  • ConsulServiceConfig__xxx__serviceAddress : xxx服务地址

  • ConsulServiceConfig__xxx__serviceName :xxx服务名称

  • InfluxDb__ConnectionString : influxdb链接地址

  • InfluxDb__Username : influxdb用户名

  • InfluxDb__Password :influxdb密码

返回