Browse Source

enhance: reference agile_config.

pull/359/head
cKey 4 years ago
parent
commit
11b44280e3
  1. 1
      aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj
  2. 9
      aspnet-core/services/account/AuthServer.Host/Program.cs
  3. 8
      aspnet-core/services/account/AuthServer.Host/appsettings.Development.json
  4. 1
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj
  5. 8
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Program.cs
  6. 8
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json
  7. 1
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj
  8. 8
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Program.cs
  9. 8
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json
  10. 1
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj
  11. 8
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/Program.cs
  12. 8
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json
  13. 1
      aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/LINGYUN.Abp.IdentityServer4.HttpApi.Host.csproj
  14. 8
      aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/Program.cs
  15. 8
      aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json
  16. 1
      aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj
  17. 8
      aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/Program.cs
  18. 8
      aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json
  19. 1
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj
  20. 8
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Program.cs
  21. 8
      aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json
  22. 1
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
  23. 8
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Program.cs
  24. 8
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json
  25. 18
      docker-compose.agile.config.yml

1
aspnet-core/services/account/AuthServer.Host/AuthServer.Host.csproj

@ -22,6 +22,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

9
aspnet-core/services/account/AuthServer.Host/Program.cs

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Serilog; using Serilog;
using System; using System;
@ -32,6 +33,14 @@ namespace AuthServer.Host
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/account/AuthServer.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.AuthServer",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "AuthServer",
"tag": "AuthServer"
},
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"SelfUrl": "http://localhost:44385/", "SelfUrl": "http://localhost:44385/",

1
aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj

@ -23,6 +23,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Program.cs

@ -34,6 +34,14 @@ namespace LINGYUN.Abp.BackendAdmin
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.Backend.Admin",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "BackendAdmin",
"tag": "BackendAdmin"
},
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"Forwarded": { "Forwarded": {

1
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/LINGYUN.ApiGateway.Host.csproj

@ -11,6 +11,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.Sqlite" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Sqlite" Version="5.1.2" />

8
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/Program.cs

@ -36,6 +36,14 @@ namespace LINGYUN.ApiGateway
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.ApiGateway",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "ApiGateway",
"tag": "ApiGateway"
},
"EnabledDynamicOcelot": true, "EnabledDynamicOcelot": true,
"ApiGateway": { "ApiGateway": {
"AppId": "TEST-APP" //OcelotAPI, "AppId": "TEST-APP" //OcelotAPI,

1
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/LINGYUN.ApiGateway.HttpApi.Host.csproj

@ -11,6 +11,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/Program.cs

@ -34,6 +34,14 @@ namespace LINGYUN.ApiGateway
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.ApiGateway.Admin",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "ApiGateway.Admin",
"tag": "ApiGateway.Admin"
},
"App": { "App": {
"TrackingEntitiesChanged": true, "TrackingEntitiesChanged": true,
"SelfUrl": "http://localhost:30001/" "SelfUrl": "http://localhost:30001/"

1
aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/LINGYUN.Abp.IdentityServer4.HttpApi.Host.csproj

@ -21,6 +21,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/Program.cs

@ -36,6 +36,14 @@ namespace LINGYUN.Abp.IdentityServer4
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.IdentityServer.Admin",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "IdentityServer.Admin",
"tag": "IdentityServer.Admin"
},
"App": { "App": {
"TrackingEntitiesChanged": true "TrackingEntitiesChanged": true
}, },

1
aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj

@ -6,6 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/Program.cs

@ -36,6 +36,14 @@ namespace LINGYUN.Abp.LocalizationManagement
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/localization/LINGYUN.Abp.LocalizationManagement.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.Localization",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "Localization",
"tag": "Localization"
},
"App": { "App": {
"TrackingEntitiesChanged": true "TrackingEntitiesChanged": true
}, },

1
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/LINGYUN.Abp.MessageService.HttpApi.Host.csproj

@ -16,6 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/Program.cs

@ -36,6 +36,14 @@ namespace LINGYUN.Abp.MessageService
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.Message",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "Message",
"tag": "Message"
},
"App": { "App": {
"CorsOrigins": "http://localhost:9527,http://localhost:30000,http://localhost:3100", "CorsOrigins": "http://localhost:9527,http://localhost:30000,http://localhost:3100",
"Forwarded": { "Forwarded": {

1
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj

@ -20,6 +20,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AgileConfig.Client" Version="1.2.1.3" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.Dashboard" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.MySql" Version="5.1.2" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" /> <PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="5.1.2" />

8
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/Program.cs

@ -36,6 +36,14 @@ namespace LINGYUN.Platform
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
}) })
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
if (configuration.GetSection("AgileConfig").Exists())
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) => .UseSerilog((context, provider, config) =>
{ {
config.ReadFrom.Configuration(context.Configuration); config.ReadFrom.Configuration(context.Configuration);

8
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/appsettings.Development.json

@ -1,4 +1,12 @@
{ {
"AgileConfig": {
"env": "DEV",
"appId": "LINGYUN.Abp.Platform",
"secret": "1q2w3E*",
"nodes": "http://localhost:5000",
"name": "Platform",
"tag": "Platform"
},
"App": { "App": {
"Forwarded": { "Forwarded": {
"ForwardedHeaders": 5, "ForwardedHeaders": 5,

18
docker-compose.agile.config.yml

@ -0,0 +1,18 @@
version: '3.4'
services:
agile-config:
image: kklldog/agile_config:latest
environment:
- adminConsole=true
- db:provider=mysql
- db:conn=Server=localhost;Database=agile;User Id=root;Password=123456;Character Set=utf8mb4
ports:
- "5000:5000"
volumes:
- /etc/localtime:/etc/localtime
restart: always
identity-server-sts:
depends_on:
- agile-config
Loading…
Cancel
Save