diff --git a/apps/vue/.env.production b/apps/vue/.env.production index 43f3dac3a..035e63f6d 100644 --- a/apps/vue/.env.production +++ b/apps/vue/.env.production @@ -38,7 +38,7 @@ VITE_LEGACY=false VITE_GLOB_MULTITENANCY_KEY='__tenant' # STS Connect -VITE_GLOB_AUTHORITY='http://127.0.0.1:44385' +VITE_GLOB_AUTHORITY='http://auth-server:44385' VITE_GLOB_CLIENT_ID='vue-admin-client' VITE_GLOB_CLIENT_SECRET='1q2w3e*' diff --git a/apps/vue/Dockerfile b/apps/vue/Dockerfile index e8f718b1b..e25741d92 100644 --- a/apps/vue/Dockerfile +++ b/apps/vue/Dockerfile @@ -7,6 +7,6 @@ COPY ./dist /usr/share/nginx/html # 将docker容器中默认的配置替换为本地配置 COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf COPY ./docker/nginx/default.conf /etc/nginx/conf.d/default.conf - + # 端口映射 EXPOSE 80 diff --git a/apps/vue/docker-compose.yml b/apps/vue/docker-compose.yml index 8ab0c9e19..67bb51334 100644 --- a/apps/vue/docker-compose.yml +++ b/apps/vue/docker-compose.yml @@ -1,16 +1,17 @@ version: '3.4' services: - vue-vben-client: + ui: build: context: . restart: always + environment: + - VITE_GLOB_AUTHORITY=http://127.0.0.1:44385 ports: - "40080:80" networks: - - framework + - abp-next-admin networks: - framework: - external: - name: ly_app_net + abp-next-admin: + driver: bridge \ No newline at end of file diff --git a/apps/vue/docker/nginx/default.conf b/apps/vue/docker/nginx/default.conf index 7b1259bd9..db8e757a6 100644 --- a/apps/vue/docker/nginx/default.conf +++ b/apps/vue/docker/nginx/default.conf @@ -24,17 +24,17 @@ server { } location /connect/ { - proxy_pass http://127.0.0.1:44385/; - proxy_set_header Host 127.0.0.1:44385; + proxy_pass http://auth-server:44385/; + proxy_set_header Host auth-server:44385; } location ~ /api/files/static/ { # 当path参数存在子路径时 不能让nginx解码 / 符号 - proxy_pass http://127.0.0.1:30000; + proxy_pass http://apigateway:30000; } location /api/ { - proxy_pass http://127.0.0.1:30000/; + proxy_pass http://apigateway:30000/; proxy_set_header Host $host; } @@ -45,7 +45,7 @@ server { } location /signalr-hubs/ { - proxy_pass http://127.0.0.1:30000/; + proxy_pass http://apigateway:30000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/aspnet-core/create-database.bat b/aspnet-core/create-database.bat index 47d19504b..32fb1efa0 100644 --- a/aspnet-core/create-database.bat +++ b/aspnet-core/create-database.bat @@ -10,6 +10,4 @@ call .\migrate-db-cmd.bat LY.MicroService.RealtimeMessage.EntityFrameworkCore me call .\migrate-db-cmd.bat LY.MicroService.TaskManagement.EntityFrameworkCore task-management --ef-u call .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.EntityFrameworkCore webhooks-management --ef-u -taskkill /IM dotnet.exe /F - -pause \ No newline at end of file +taskkill /IM dotnet.exe /F \ No newline at end of file diff --git a/aspnet-core/migrate-database.bat b/aspnet-core/migrate-database.bat index d9594e692..f94f20e30 100644 --- a/aspnet-core/migrate-database.bat +++ b/aspnet-core/migrate-database.bat @@ -10,5 +10,4 @@ call .\migrate-db-cmd.bat LY.MicroService.TaskManagement.DbMigrator task-managem call .\migrate-db-cmd.bat LY.MicroService.WebhooksManagement.DbMigrator webhooks-management --run call .\migrate-db-cmd.bat LY.MicroService.BackendAdmin.DbMigrator admin --run - -pause \ No newline at end of file +taskkill /IM dotnet.exe /F \ No newline at end of file diff --git a/aspnet-core/migrate-db-cmd.bat b/aspnet-core/migrate-db-cmd.bat index 5a4907119..23ab88b49 100644 --- a/aspnet-core/migrate-db-cmd.bat +++ b/aspnet-core/migrate-db-cmd.bat @@ -14,7 +14,7 @@ if '%3' equ '' goto run exit :run -dotnet run +start cmd.exe /c dotnet run goto end :restore diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs index f65e6ecdc..e75054f19 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - //options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs index e471e113b..113b88e51 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs @@ -10,5 +10,4 @@ namespace LY.MicroService.AuthServer.DbMigrator; )] public partial class AuthServerDbMigratorModule : AbpModule { - } diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj index 9a802a37e..694b44e14 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj @@ -20,7 +20,6 @@ - @@ -31,7 +30,6 @@ - diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs index 4860b953c..1bea700a3 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.AuthServer.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json index 55141e6dc..a3870c365 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/appsettings.json @@ -1,13 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None", - "AbpIdentity": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None", - "OpenIddict": "Server=127.0.0.1;Database=AuthServer-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs index bfddb9d6e..85a15ded8 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationEventHandler.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Identity; +using LINGYUN.Abp.Identity; +using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -12,6 +13,7 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; +using IdentityPermissions = Volo.Abp.Identity.IdentityPermissions; namespace LY.MicroService.AuthServer.EntityFrameworkCore; diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs index fae417b01..0667bb5c0 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs @@ -1,23 +1,27 @@ using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Identity.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Authorization; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.OpenIddict.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.AuthServer.EntityFrameworkCore; [DependsOn( typeof(AbpAuthorizationModule), - typeof(AbpIdentityApplicationContractsModule), typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpOpenIddictEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule) )] public class AuthServerMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj index de4969115..e378e041a 100644 --- a/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj +++ b/aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj @@ -16,14 +16,17 @@ + + - + + diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs index a8688c04a..4d801a99c 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - // options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs index fe9292cfa..77b9b3773 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs @@ -1,42 +1,45 @@ -using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.Auditing; +using LINGYUN.Abp.CachingManagement; +using LINGYUN.Abp.Identity; +using LINGYUN.Abp.IdentityServer; +using LINGYUN.Abp.LocalizationManagement; +using LINGYUN.Abp.MessageService; +using LINGYUN.Abp.Notifications; +using LINGYUN.Abp.OpenIddict; +using LINGYUN.Abp.OssManagement; +using LINGYUN.Abp.SettingManagement; +using LINGYUN.Abp.TaskManagement; +using LINGYUN.Abp.TextTemplating; +using LINGYUN.Abp.WebhooksManagement; +using LINGYUN.Platform; using LY.MicroService.BackendAdmin.EntityFrameworkCore; -using Volo.Abp.Authorization.Permissions; using Volo.Abp.Autofac; using Volo.Abp.FeatureManagement; -using Volo.Abp.Features; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement; -using Volo.Abp.SettingManagement; namespace LY.MicroService.BackendAdmin.DbMigrator; [DependsOn( typeof(BackendAdminMigrationsEntityFrameworkCoreModule), + typeof(AbpFeatureManagementApplicationContractsModule), + typeof(AbpSettingManagementApplicationContractsModule), + typeof(AbpPermissionManagementApplicationContractsModule), + typeof(AbpLocalizationManagementApplicationContractsModule), + typeof(AbpCachingManagementApplicationContractsModule), + typeof(AbpAuditingApplicationContractsModule), + typeof(AbpTextTemplatingApplicationContractsModule), + typeof(AbpIdentityApplicationContractsModule), + typeof(AbpIdentityServerApplicationContractsModule), + typeof(AbpOpenIddictApplicationContractsModule), + typeof(PlatformApplicationContractModule), + typeof(AbpOssManagementApplicationContractsModule), + typeof(AbpNotificationsApplicationContractsModule), + typeof(AbpMessageServiceApplicationContractsModule), + typeof(TaskManagementApplicationContractsModule), + typeof(WebhooksManagementApplicationContractsModule), typeof(AbpAutofacModule) )] public partial class BackendAdminDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.IsDynamicSettingStoreEnabled = true; - options.SaveStaticSettingsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicFeatureStoreEnabled = true; - options.SaveStaticFeaturesToDatabase = true; - }); - Configure(options => - { - options.IsDynamicPermissionStoreEnabled = true; - options.SaveStaticPermissionsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicTemplateDefinitionStoreEnabled = true; - options.SaveStaticTemplateDefinitionToDatabase = true; - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj index 9b9862974..5d6b11570 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj @@ -13,12 +13,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -29,7 +30,22 @@ - + + + + + + + + + + + + + + + + diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs index 1a93600f5..86f13fa07 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.BackendAdmin.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json index 1ee7c066f..914763e69 100644 --- a/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/appsettings.json @@ -1,11 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs index f3443558d..a578a476b 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - // options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs index cb951ef59..b2ccc2329 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs @@ -10,4 +10,4 @@ namespace LY.MicroService.IdentityServer.DbMigrator; )] public partial class IdentityServerDbMigratorModule : AbpModule { -} +} \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj index 9095c4ea6..445fd6b34 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj @@ -11,16 +11,15 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - @@ -31,8 +30,6 @@ - - diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Program.cs index 68f6cf29e..6b8e7e902 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.IdentityServer.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json index 687321e98..40a2e54bb 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/appsettings.json @@ -1,16 +1,21 @@ { - "App": { - "CorsOrigins": "http://127.0.0.1:3100" - }, "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456;SslMode=None", - "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456;SslMode=None", - "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "IdentityServer": { "Clients": { diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationEventHandler.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationEventHandler.cs index 7be950433..ac81f9e6e 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationEventHandler.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationEventHandler.cs @@ -12,6 +12,7 @@ using Volo.Abp.MultiTenancy; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; +using IdentityPermissions = Volo.Abp.Identity.IdentityPermissions; using IdentityRole = Volo.Abp.Identity.IdentityRole; using IdentityUser = Volo.Abp.Identity.IdentityUser; diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs index acc6e8f0b..1d3a68c17 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs @@ -2,21 +2,26 @@ using LINGYUN.Abp.Identity.EntityFrameworkCore; using LINGYUN.Abp.IdentityServer.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; using LINGYUN.Abp.WeChat; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; -using Volo.Abp.Identity; +using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity; using Volo.Abp.PermissionManagement.EntityFrameworkCore; +using Volo.Abp.SettingManagement.EntityFrameworkCore; namespace LY.MicroService.IdentityServer.EntityFrameworkCore; [DependsOn( - typeof(AbpIdentityApplicationContractsModule), typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpSettingManagementEntityFrameworkCoreModule), + typeof(AbpFeatureManagementEntityFrameworkCoreModule), + typeof(AbpPermissionManagementEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(AbpWeChatModule), typeof(AbpDataDbMigratorModule) )] diff --git a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj index 281287d85..e546e59ff 100644 --- a/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj +++ b/aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj @@ -14,16 +14,19 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + - + + diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj index 65109be7a..e5c5537dc 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj @@ -20,9 +20,6 @@ - - - @@ -33,8 +30,6 @@ - - diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs index 99029178f..df03c3de7 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - // options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs index 31faed115..c99ed3745 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs @@ -1,9 +1,6 @@ using LY.MicroService.LocalizationManagement.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement; -using Volo.Abp.SettingManagement; namespace LY.MicroService.LocalizationManagement.DbMigrator; @@ -13,22 +10,4 @@ namespace LY.MicroService.LocalizationManagement.DbMigrator; )] public partial class LocalizationManagementDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.IsDynamicSettingStoreEnabled = true; - options.SaveStaticSettingsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicFeatureStoreEnabled = true; - options.SaveStaticFeaturesToDatabase = true; - }); - Configure(options => - { - options.IsDynamicPermissionStoreEnabled = true; - options.SaveStaticPermissionsToDatabase = true; - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs index 3bcb16c66..160347370 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.LocalizationManagement.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json index df7bc3e3e..63ba4b089 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/appsettings.json @@ -1,11 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs index e17d8c1cc..d0724b2f4 100644 --- a/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs @@ -12,10 +12,10 @@ namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore; [DependsOn( typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule) )] public class LocalizationManagementMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj index 17ca0720a..dab7b5c18 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj @@ -13,7 +13,7 @@ - + all @@ -21,9 +21,6 @@ - - - @@ -34,9 +31,6 @@ - - - diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs index 6d184bb5c..fbb1c2bd7 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - // options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs index 37479dcc2..231e43db9 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs @@ -1,36 +1,13 @@ -using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; -using LY.MicroService.Platform.EntityFrameworkCore; +using LY.MicroService.Platform.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement; -using Volo.Abp.SettingManagement; namespace LY.MicroService.Platform.DbMigrator; [DependsOn( typeof(PlatformMigrationsEntityFrameworkCoreModule), - typeof(AbpUINavigationVueVbenAdminModule), typeof(AbpAutofacModule) )] public partial class PlatformDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.IsDynamicSettingStoreEnabled = true; - options.SaveStaticSettingsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicFeatureStoreEnabled = true; - options.SaveStaticFeaturesToDatabase = true; - }); - Configure(options => - { - options.IsDynamicPermissionStoreEnabled = true; - options.SaveStaticPermissionsToDatabase = true; - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs index d86e016cb..56b15a785 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Program.cs @@ -13,7 +13,7 @@ public async static Task Main(string[] args) Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .MinimumLevel.Override("Microsoft", LogEventLevel.Warning) - .MinimumLevel.Override("Volo.Abp", LogEventLevel.Debug) + .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) #if DEBUG .MinimumLevel.Override("LY.MicroService.Platform", LogEventLevel.Debug) #else diff --git a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json index 2a97776f1..63ba4b089 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/appsettings.json @@ -1,12 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AppPlatform": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", @@ -15,11 +24,11 @@ }, "Serilog": { "MinimumLevel": { - "Default": "Debug", + "Default": "Information", "Override": { - "System": "Debug", - "Microsoft": "Debug", - "DotNetCore": "Debug" + "System": "Warning", + "Microsoft": "Warning", + "DotNetCore": "Information" } }, "Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ], diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj index 21282577c..dc7f89d76 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj @@ -21,6 +21,7 @@ + diff --git a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs index 48ab1c592..05a9b0b92 100644 --- a/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs @@ -1,5 +1,6 @@ using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.FeatureManagement.EntityFrameworkCore; @@ -11,10 +12,11 @@ namespace LY.MicroService.Platform.EntityFrameworkCore; [DependsOn( typeof(AbpSaasEntityFrameworkCoreModule), + typeof(LINGYUN.Platform.EntityFrameworkCore.PlatformEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(LINGYUN.Platform.EntityFrameworkCore.PlatformEntityFrameworkCoreModule), + typeof(AbpUINavigationVueVbenAdminModule), typeof(AbpDataDbMigratorModule) )] public class PlatformMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj index 8f79d3c17..9d4aad966 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj @@ -1,7 +1,7 @@  - + Exe net8.0 @@ -20,9 +20,6 @@ - - - @@ -33,10 +30,7 @@ - - - - + diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs index 0f34ac55f..bff87b3a7 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.RealtimeMessage.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs index 6090ac486..7d2766e2e 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs @@ -33,7 +33,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - // options.AddDataMigrationEnvironment(); + options.AddDataMigrationEnvironment(); }); await application.InitializeAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs index bef0d8971..02816d783 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs @@ -1,11 +1,7 @@ using LINGYUN.Abp.Data.DbMigrator; -using LINGYUN.Abp.Notifications; using LY.MicroService.RealtimeMessage.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.FeatureManagement; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement; -using Volo.Abp.SettingManagement; namespace LY.MicroService.RealtimeMessage.DbMigrator; @@ -16,27 +12,4 @@ namespace LY.MicroService.RealtimeMessage.DbMigrator; )] public partial class RealtimeMessageDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.IsDynamicSettingStoreEnabled = true; - options.SaveStaticSettingsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicFeatureStoreEnabled = true; - options.SaveStaticFeaturesToDatabase = true; - }); - Configure(options => - { - options.IsDynamicPermissionStoreEnabled = true; - options.SaveStaticPermissionsToDatabase = true; - }); - Configure(options => - { - options.IsDynamicNotificationsStoreEnabled = true; - options.SaveStaticNotificationsToDatabase = true; - }); - } } diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json index 7ac997d95..f743586ca 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/appsettings.json @@ -1,13 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Messages-v70;User Id=root;Password=123456;SslMode=None", - "Notifications": "Server=127.0.0.1;Database=Messages-v70;User Id=root;Password=123456;SslMode=None", - "MessageService": "Server=127.0.0.1;Database=Messages-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj index 81b1d705f..a36536131 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj @@ -25,6 +25,7 @@ + diff --git a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs index 65039461a..cc1e0fde9 100644 --- a/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs @@ -2,6 +2,7 @@ using LINGYUN.Abp.MessageService.EntityFrameworkCore; using LINGYUN.Abp.Notifications.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore; +using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.FeatureManagement.EntityFrameworkCore; @@ -13,11 +14,12 @@ namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore; [DependsOn( typeof(AbpSaasEntityFrameworkCoreModule), + typeof(AbpNotificationsEntityFrameworkCoreModule), + typeof(AbpMessageServiceEntityFrameworkCoreModule), + typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(AbpNotificationsEntityFrameworkCoreModule), - typeof(AbpMessageServiceEntityFrameworkCoreModule), typeof(AbpDataDbMigratorModule) )] public class RealtimeMessageMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj index ace2e31c3..653b325f2 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj @@ -20,9 +20,6 @@ - - - @@ -33,9 +30,6 @@ - - - diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs index 185fb7e53..874475846 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Program.cs @@ -20,7 +20,7 @@ public async static Task Main(string[] args) .MinimumLevel.Override("LY.MicroService.TaskManagement.DbMigrator", LogEventLevel.Information) #endif .Enrich.FromLogContext() - .WriteTo.Console() + .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}") .WriteTo.File("Logs/migrations.txt") .CreateLogger(); diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs index c635bf2c8..a28df7c77 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorHostedService.cs @@ -36,7 +36,7 @@ public async Task StartAsync(CancellationToken cancellationToken) await application .ServiceProvider .GetRequiredService() - .MigrateAsync(); + .CheckAndApplyDatabaseMigrationsAsync(); await application.ShutdownAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs index e81dabc63..0cd2fe685 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs @@ -10,5 +10,4 @@ namespace LY.MicroService.TaskManagement.DbMigrator; )] public partial class TaskManagementDbMigratorModule : AbpModule { - } diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json index d570630b7..63ba4b089 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/appsettings.json @@ -1,12 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "TaskManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs index 1e21b9aba..35684f356 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs @@ -1,221 +1,58 @@ using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Saas.Tenants; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; namespace LY.MicroService.TaskManagement.EntityFrameworkCore; -public class TaskManagementDbMigrationService : ITransientDependency +public class TaskManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency { - public ILogger Logger { get; set; } - - private readonly IDataSeeder _dataSeeder; - private readonly IDbSchemaMigrator _dbSchemaMigrator; - private readonly ITenantRepository _tenantRepository; - private readonly ICurrentTenant _currentTenant; + protected IDataSeeder DataSeeder { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + protected ITenantRepository TenantRepository { get; } public TaskManagementDbMigrationService( IDataSeeder dataSeeder, IDbSchemaMigrator dbSchemaMigrator, ITenantRepository tenantRepository, - ICurrentTenant currentTenant) - { - _dataSeeder = dataSeeder; - _dbSchemaMigrator = dbSchemaMigrator; - _tenantRepository = tenantRepository; - _currentTenant = currentTenant; - - Logger = NullLogger.Instance; - } - - public async Task MigrateAsync() - { - var initialMigrationAdded = AddInitialMigrationIfNotExist(); - - if (initialMigrationAdded) - { - return; - } - - Logger.LogInformation("Started database migrations..."); - - await MigrateDatabaseSchemaAsync(); - await SeedDataAsync(); - - Logger.LogInformation($"Successfully completed host database migrations."); - - var tenants = await _tenantRepository.GetListAsync(includeDetails: true); - - var migratedDatabaseSchemas = new HashSet(); - foreach (var tenant in tenants) - { - using (_currentTenant.Change(tenant.Id)) - { - if (tenant.ConnectionStrings.Any()) - { - var tenantConnectionStrings = tenant.ConnectionStrings - .Select(x => x.Value) - .ToList(); - - if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings)) - { - await MigrateDatabaseSchemaAsync(tenant); - - migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings); - } - } - - await SeedDataAsync(tenant); - } - - Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations."); - } - - Logger.LogInformation("Successfully completed all database migrations."); - Logger.LogInformation("You can safely end this process..."); - } - - private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) - { - Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); - // 迁移租户数据 - await _dbSchemaMigrator.MigrateAsync( - (connectionString, builder) => - { - builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new TaskManagementMigrationsDbContext(builder.Options); - }); - } - - private async Task SeedDataAsync(Tenant tenant = null) - { - Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - - await _dataSeeder.SeedAsync(tenant?.Id); - } - - private bool AddInitialMigrationIfNotExist() - { - try - { - if (!DbMigrationsProjectExists()) - { - return false; - } - } - catch (Exception) - { - return false; - } - - try - { - if (!MigrationsFolderExists()) - { - AddInitialMigration(); - return true; - } - else - { - return false; - } - } - catch (Exception e) - { - Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); - return false; - } - } - - private bool DbMigrationsProjectExists() + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) { - return Directory.Exists(GetEntityFrameworkCoreProjectFolderPath()); - } - - private bool MigrationsFolderExists() - { - var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); - - return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations")); - } - - private void AddInitialMigration() - { - Logger.LogInformation("Creating initial migration..."); - - string argumentPrefix; - string fileName; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - argumentPrefix = "-c"; - fileName = "/bin/bash"; - } - else - { - argumentPrefix = "/C"; - fileName = "cmd.exe"; - } - - var procStartInfo = new ProcessStartInfo(fileName, - $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\" --nolayers\"" - ); - - try - { - Process.Start(procStartInfo); - } - catch (Exception) - { - throw new Exception("Couldn't run ABP CLI..."); - } + DataSeeder = dataSeeder; + DbSchemaMigrator = dbSchemaMigrator; + TenantRepository = tenantRepository; } - private string GetEntityFrameworkCoreProjectFolderPath() + protected async override Task LockAndApplyDatabaseMigrationsAsync() { - var slnDirectoryPath = GetSolutionDirectoryPath(); + await base.LockAndApplyDatabaseMigrationsAsync(); - if (slnDirectoryPath == null) + var tenants = await TenantRepository.GetListAsync(); + foreach (var tenant in tenants.Where(x => x.IsActive)) { - throw new Exception("Solution folder not found!"); + await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id); } - - return Path.Combine(slnDirectoryPath, "LY.MicroService.TaskManagement.DbMigrator"); } - private string GetSolutionDirectoryPath() + protected async override Task SeedAsync() { - var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); - - while (Directory.GetParent(currentDirectory.FullName) != null) - { - currentDirectory = Directory.GetParent(currentDirectory.FullName); - - if (Directory.GetFiles(currentDirectory!.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) - { - return currentDirectory.FullName; - } - - // parent host - currentDirectory = Directory.GetParent(currentDirectory.FullName); - if (Directory.GetFiles(currentDirectory!.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) - { - return currentDirectory.FullName; - } - } + Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed..."); - return null; + await DataSeeder.SeedAsync(CurrentTenant.Id); } } \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs index c3196690a..1c5ea286c 100644 --- a/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsEntityFrameworkCoreModule.cs @@ -13,11 +13,11 @@ namespace LY.MicroService.TaskManagement.EntityFrameworkCore; [DependsOn( typeof(AbpSaasEntityFrameworkCoreModule), + typeof(TaskManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(TaskManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpDataDbMigratorModule) )] public class TaskManagementMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj index 2c4040e7f..69f863b85 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/LY.MicroService.WebhooksManagement.DbMigrator.csproj @@ -20,9 +20,6 @@ - - - @@ -33,8 +30,6 @@ - - diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs index 053dead0c..7c9ad7f5c 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/WebhooksManagementDbMigratorHostedService.cs @@ -36,7 +36,7 @@ public async Task StartAsync(CancellationToken cancellationToken) await application .ServiceProvider .GetRequiredService() - .MigrateAsync(); + .CheckAndApplyDatabaseMigrationsAsync(); await application.ShutdownAsync(); diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json index cec7cdb98..63ba4b089 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator/appsettings.json @@ -1,10 +1,21 @@ { "ConnectionStrings": { "Default": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSaas": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None", - "WebhooksManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456;SslMode=None" + "AbpAuditLogging": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpOpenIddict": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentity": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpIdentityServer": "Server=127.0.0.1;Database=IdentityServer-V70;User Id=root;Password=123456;SslMode=None", + "AbpSaas": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTenantManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpSettingManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpLocalizationManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "AbpTextTemplating": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None", + "Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None", + "MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None" }, "StringEncryption": { "DefaultPassPhrase": "s46c5q55nxpeS8Ra", diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs index c59c158c5..4ddfa4424 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementDbMigrationService.cs @@ -1,221 +1,58 @@ using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Saas.Tenants; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Threading.Tasks; using Volo.Abp.Data; using Volo.Abp.DependencyInjection; +using Volo.Abp.DistributedLocking; +using Volo.Abp.EventBus.Distributed; using Volo.Abp.MultiTenancy; +using Volo.Abp.Uow; namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; -public class WebhooksManagementDbMigrationService : ITransientDependency +public class WebhooksManagementDbMigrationService : EfCoreRuntimeDbMigratorBase, ITransientDependency { - public ILogger Logger { get; set; } - - private readonly IDataSeeder _dataSeeder; - private readonly IDbSchemaMigrator _dbSchemaMigrator; - private readonly ITenantRepository _tenantRepository; - private readonly ICurrentTenant _currentTenant; + protected IDataSeeder DataSeeder { get; } + protected IDbSchemaMigrator DbSchemaMigrator { get; } + protected ITenantRepository TenantRepository { get; } public WebhooksManagementDbMigrationService( IDataSeeder dataSeeder, IDbSchemaMigrator dbSchemaMigrator, ITenantRepository tenantRepository, - ICurrentTenant currentTenant) - { - _dataSeeder = dataSeeder; - _dbSchemaMigrator = dbSchemaMigrator; - _tenantRepository = tenantRepository; - _currentTenant = currentTenant; - - Logger = NullLogger.Instance; - } - - public async Task MigrateAsync() - { - var initialMigrationAdded = AddInitialMigrationIfNotExist(); - - if (initialMigrationAdded) - { - return; - } - - Logger.LogInformation("Started database migrations..."); - - await MigrateDatabaseSchemaAsync(); - await SeedDataAsync(); - - Logger.LogInformation($"Successfully completed host database migrations."); - - var tenants = await _tenantRepository.GetListAsync(includeDetails: true); - - var migratedDatabaseSchemas = new HashSet(); - foreach (var tenant in tenants) - { - using (_currentTenant.Change(tenant.Id)) - { - if (tenant.ConnectionStrings.Any()) - { - var tenantConnectionStrings = tenant.ConnectionStrings - .Select(x => x.Value) - .ToList(); - - if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings)) - { - await MigrateDatabaseSchemaAsync(tenant); - - migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings); - } - } - - await SeedDataAsync(tenant); - } - - Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations."); - } - - Logger.LogInformation("Successfully completed all database migrations."); - Logger.LogInformation("You can safely end this process..."); - } - - private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) - { - Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); - // 迁移租户数据 - await _dbSchemaMigrator.MigrateAsync( - (connectionString, builder) => - { - builder.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); - - return new WebhooksManagementMigrationsDbContext(builder.Options); - }); - } - - private async Task SeedDataAsync(Tenant tenant = null) - { - Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); - - await _dataSeeder.SeedAsync(tenant?.Id); - } - - private bool AddInitialMigrationIfNotExist() - { - try - { - if (!DbMigrationsProjectExists()) - { - return false; - } - } - catch (Exception) - { - return false; - } - - try - { - if (!MigrationsFolderExists()) - { - AddInitialMigration(); - return true; - } - else - { - return false; - } - } - catch (Exception e) - { - Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); - return false; - } - } - - private bool DbMigrationsProjectExists() + ICurrentTenant currentTenant, + IUnitOfWorkManager unitOfWorkManager, + IServiceProvider serviceProvider, + IAbpDistributedLock abpDistributedLock, + IDistributedEventBus distributedEventBus, + ILoggerFactory loggerFactory) + : base( + ConnectionStringNameAttribute.GetConnStringName(), + unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory) { - return Directory.Exists(GetEntityFrameworkCoreProjectFolderPath()); - } - - private bool MigrationsFolderExists() - { - var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath(); - - return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations")); - } - - private void AddInitialMigration() - { - Logger.LogInformation("Creating initial migration..."); - - string argumentPrefix; - string fileName; - - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - argumentPrefix = "-c"; - fileName = "/bin/bash"; - } - else - { - argumentPrefix = "/C"; - fileName = "cmd.exe"; - } - - var procStartInfo = new ProcessStartInfo(fileName, - $"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\" --nolayers\"" - ); - - try - { - Process.Start(procStartInfo); - } - catch (Exception) - { - throw new Exception("Couldn't run ABP CLI..."); - } + DataSeeder = dataSeeder; + DbSchemaMigrator = dbSchemaMigrator; + TenantRepository = tenantRepository; } - private string GetEntityFrameworkCoreProjectFolderPath() + protected async override Task LockAndApplyDatabaseMigrationsAsync() { - var slnDirectoryPath = GetSolutionDirectoryPath(); + await base.LockAndApplyDatabaseMigrationsAsync(); - if (slnDirectoryPath == null) + var tenants = await TenantRepository.GetListAsync(); + foreach (var tenant in tenants.Where(x => x.IsActive)) { - throw new Exception("Solution folder not found!"); + await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id); } - - return Path.Combine(slnDirectoryPath, "LY.MicroService.WebhooksManagement.DbMigrator"); } - private string GetSolutionDirectoryPath() + protected async override Task SeedAsync() { - var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); - - while (Directory.GetParent(currentDirectory.FullName) != null) - { - currentDirectory = Directory.GetParent(currentDirectory.FullName); - - if (Directory.GetFiles(currentDirectory!.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) - { - return currentDirectory.FullName; - } - - // parent host - currentDirectory = Directory.GetParent(currentDirectory.FullName); - if (Directory.GetFiles(currentDirectory!.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) - { - return currentDirectory.FullName; - } - } + Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed..."); - return null; + await DataSeeder.SeedAsync(CurrentTenant.Id); } } \ No newline at end of file diff --git a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs index 268990c31..cd096a2cf 100644 --- a/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs +++ b/aspnet-core/migrations/LY.MicroService.WebhooksManagement.EntityFrameworkCore/WebhooksManagementMigrationsEntityFrameworkCoreModule.cs @@ -13,11 +13,11 @@ namespace LY.MicroService.WebhooksManagement.EntityFrameworkCore; [DependsOn( typeof(AbpSaasEntityFrameworkCoreModule), + typeof(WebhooksManagementEntityFrameworkCoreModule), + typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule), - typeof(WebhooksManagementEntityFrameworkCoreModule), - typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpDataDbMigratorModule) )] public class WebhooksManagementMigrationsEntityFrameworkCoreModule : AbpModule diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhookDefinitionInitializer.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhookDefinitionInitializer.cs new file mode 100644 index 000000000..845cafad1 --- /dev/null +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhookDefinitionInitializer.cs @@ -0,0 +1,94 @@ +using LINGYUN.Abp.Webhooks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using System; +using System.Threading; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Threading; +using Volo.Abp.Uow; + +namespace LINGYUN.Abp.WebhooksManagement; +public class WebhookDefinitionInitializer : ITransientDependency +{ + protected IRootServiceProvider RootServiceProvider { get; } + protected ICancellationTokenProvider CancellationTokenProvider { get; } + protected WebhooksManagementOptions WebhooksManagementOptions { get; } + public WebhookDefinitionInitializer( + IRootServiceProvider rootServiceProvider, + ICancellationTokenProvider cancellationTokenProvider, + IOptions webhooksManagementOptions) + { + RootServiceProvider = rootServiceProvider; + CancellationTokenProvider = cancellationTokenProvider; + WebhooksManagementOptions = webhooksManagementOptions.Value; + } + + [UnitOfWork] + public async virtual Task InitializeDynamicWebhooks(CancellationToken cancellationToken) + { + if (!WebhooksManagementOptions.SaveStaticWebhooksToDatabase && !WebhooksManagementOptions.IsDynamicWebhookStoreEnabled) + { + return; + } + + using var scope = RootServiceProvider.CreateScope(); + var applicationLifetime = scope.ServiceProvider.GetService(); + var token = applicationLifetime?.ApplicationStopping ?? cancellationToken; + try + { + using (CancellationTokenProvider.Use(cancellationToken)) + { + if (CancellationTokenProvider.Token.IsCancellationRequested) + { + return; + } + + await SaveStaticNotificationsToDatabaseAsync(scope); + + if (CancellationTokenProvider.Token.IsCancellationRequested) + { + return; + } + + await PreCacheDynamicNotificationsAsync(scope); + } + } + catch (OperationCanceledException) + { + // ignore + } + catch (Exception ex) + { + scope.ServiceProvider + .GetService>()? + .LogException(ex); + } + } + + private async Task SaveStaticNotificationsToDatabaseAsync(IServiceScope serviceScope) + { + if (!WebhooksManagementOptions.SaveStaticWebhooksToDatabase) + { + return; + } + + var saver = serviceScope.ServiceProvider.GetRequiredService(); + + await saver.SaveAsync(); + } + + private async Task PreCacheDynamicNotificationsAsync(IServiceScope serviceScope) + { + if (!WebhooksManagementOptions.IsDynamicWebhookStoreEnabled) + { + return; + } + + var store = serviceScope.ServiceProvider.GetRequiredService(); + + await store.GetGroupsAsync(); + } +} diff --git a/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs b/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs index 1ed8d8d40..6b26e5a35 100644 --- a/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs +++ b/aspnet-core/modules/webhooks/LINGYUN.Abp.WebhooksManagement.Domain/LINGYUN/Abp/WebhooksManagement/WebhooksManagementDomainModule.cs @@ -1,17 +1,11 @@ using LINGYUN.Abp.Webhooks; using LINGYUN.Abp.WebhooksManagement.ObjectExtending; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Polly; -using System; using System.Threading; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.AutoMapper; using Volo.Abp.Data; -using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Modularity; using Volo.Abp.ObjectExtending.Modularity; @@ -97,8 +91,9 @@ public override void OnApplicationInitialization(ApplicationInitializationContex public override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) { - InitializeDynamicWebhooks(context); - return Task.CompletedTask; + return context.ServiceProvider + .GetRequiredService() + .InitializeDynamicWebhooks(_cancellationTokenSource.Token); } public override Task OnApplicationShutdownAsync(ApplicationShutdownContext context) @@ -106,111 +101,4 @@ public override Task OnApplicationShutdownAsync(ApplicationShutdownContext conte _cancellationTokenSource.Cancel(); return Task.CompletedTask; } - - private void InitializeDynamicWebhooks(ApplicationInitializationContext context) - { - var options = context - .ServiceProvider - .GetRequiredService>() - .Value; - - if (!options.SaveStaticWebhooksToDatabase && !options.IsDynamicWebhookStoreEnabled) - { - return; - } - - var rootServiceProvider = context.ServiceProvider.GetRequiredService(); - - Task.Run(async () => - { - using var scope = rootServiceProvider.CreateScope(); - var applicationLifetime = scope.ServiceProvider.GetService(); - var cancellationTokenProvider = scope.ServiceProvider.GetRequiredService(); - var cancellationToken = applicationLifetime?.ApplicationStopping ?? _cancellationTokenSource.Token; - - try - { - using (cancellationTokenProvider.Use(cancellationToken)) - { - if (cancellationTokenProvider.Token.IsCancellationRequested) - { - return; - } - - await SaveStaticWebhooksToDatabaseAsync(options, scope, cancellationTokenProvider); - - if (cancellationTokenProvider.Token.IsCancellationRequested) - { - return; - } - - await PreCacheDynamicWebhooksAsync(options, scope); - } - } - // ReSharper disable once EmptyGeneralCatchClause (No need to log since it is logged above) - catch { } - }); - } - - private async static Task SaveStaticWebhooksToDatabaseAsync( - WebhooksManagementOptions options, - IServiceScope scope, - ICancellationTokenProvider cancellationTokenProvider) - { - if (!options.SaveStaticWebhooksToDatabase) - { - return; - } - - await Policy - .Handle() - .WaitAndRetryAsync(8, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt) * 10)) - .ExecuteAsync(async _ => - { - try - { - // ReSharper disable once AccessToDisposedClosure - await scope - .ServiceProvider - .GetRequiredService() - .SaveAsync(); - } - catch (Exception ex) - { - // ReSharper disable once AccessToDisposedClosure - scope.ServiceProvider - .GetService>()? - .LogException(ex); - - throw; // Polly will catch it - } - }, cancellationTokenProvider.Token); - } - - private async static Task PreCacheDynamicWebhooksAsync(WebhooksManagementOptions options, IServiceScope scope) - { - if (!options.IsDynamicWebhookStoreEnabled) - { - return; - } - - try - { - // Pre-cache permissions, so first request doesn't wait - await scope - .ServiceProvider - .GetRequiredService() - .GetGroupsAsync(); - } - catch (Exception ex) - { - // ReSharper disable once AccessToDisposedClosure - scope - .ServiceProvider - .GetService>()? - .LogException(ex); - - throw; // It will be cached in InitializeDynamicWebhooks - } - } } diff --git a/aspnet-core/services/LY.MicroService.Applications.Single/Dockerfile b/aspnet-core/services/LY.MicroService.Applications.Single/Dockerfile index ab2862c95..765d29bf2 100644 --- a/aspnet-core/services/LY.MicroService.Applications.Single/Dockerfile +++ b/aspnet-core/services/LY.MicroService.Applications.Single/Dockerfile @@ -11,7 +11,5 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] -VOLUME [ "./app/blobs" ] -VOLUME [ "./app/wwwroot" ] ENTRYPOINT ["dotnet", "LY.MicroService.Applications.Single.dll"] diff --git a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Dockerfile index b056f3f95..9e5120acc 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.AuthServer.HttpApi.Host/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.AuthServer/Dockerfile b/aspnet-core/services/LY.MicroService.AuthServer/Dockerfile index 6a4d0f656..2c61a2a63 100644 --- a/aspnet-core/services/LY.MicroService.AuthServer/Dockerfile +++ b/aspnet-core/services/LY.MicroService.AuthServer/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Dockerfile index 22cbff502..54747acc8 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/Dockerfile @@ -4,12 +4,8 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] -VOLUME [ "~/.microsoft/usersecrets/" ] ENTRYPOINT ["dotnet", "LY.MicroService.BackendAdmin.HttpApi.Host.dll"] diff --git a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json index 3d69f3904..c59a2af78 100644 --- a/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/LY.MicroService.BackendAdmin.HttpApi.Host/appsettings.Development.json @@ -73,7 +73,7 @@ "InstanceName": "LINGYUN.Abp.Application" }, "AuthServer": { - "Authority": "http://127.0.0.1:44385/", + "Authority": "http://auth-server:44385/", "ApiName": "lingyun-abp-application" }, "Logging": { diff --git a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Dockerfile index 3932de161..1d7e1df23 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.IdentityServer.HttpApi.Host/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.IdentityServer/Dockerfile b/aspnet-core/services/LY.MicroService.IdentityServer/Dockerfile index 6ff507ef2..ef621251a 100644 --- a/aspnet-core/services/LY.MicroService.IdentityServer/Dockerfile +++ b/aspnet-core/services/LY.MicroService.IdentityServer/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Dockerfile index df8c7dc6b..4fc43e810 100644 --- a/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.LocalizationManagement.HttpApi.Host/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Dockerfile index 7c068dc86..0e753f273 100644 --- a/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.PlatformManagement.HttpApi.Host/Dockerfile @@ -4,12 +4,8 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] -VOLUME [ "./app/file-blob-storing" ] ENTRYPOINT ["dotnet", "LY.MicroService.PlatformManagement.HttpApi.Host.dll"] \ No newline at end of file diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Dockerfile index 9b5db51cf..829a36745 100644 --- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Dockerfile index 9b9906af9..2f6f17824 100644 --- a/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -#东8区 -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone ## 有些定时作业可能需要建立独立的数据库连接, 可能跨不同的数据库, 配置一下MSSQL ## 解决连接SqlServer TLS版本过高问题 RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Dockerfile index 7aeb65dc8..ab29c4332 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/Dockerfile @@ -4,10 +4,6 @@ WORKDIR /app COPY . /app -## Beijing time, self replacement -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs index 5e4e8606f..e3401f14b 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.Configure.cs @@ -41,8 +41,10 @@ using Volo.Abp.Json.SystemTextJson; using Volo.Abp.Localization; using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement; using Volo.Abp.Quartz; using Volo.Abp.Security.Claims; +using Volo.Abp.SettingManagement; using Volo.Abp.Threading; using Volo.Abp.VirtualFileSystem; @@ -374,6 +376,22 @@ private void ConfigureFeatureManagement() }); } + private void ConfigurePermissionManagement() + { + Configure(options => + { + options.IsDynamicPermissionStoreEnabled = true; + }); + } + + private void ConfigureSettingManagement() + { + Configure(options => + { + options.IsDynamicSettingStoreEnabled = true; + }); + } + private void ConfigureWebhooks(IServiceCollection services) { Configure(options => diff --git a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs index 55b5902e1..23999feb4 100644 --- a/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs +++ b/aspnet-core/services/LY.MicroService.WebhooksManagement.HttpApi.Host/WebhooksManagementHttpApiHostModule.cs @@ -104,6 +104,8 @@ public override void ConfigureServices(ServiceConfigurationContext context) ConfigureExceptionHandling(); ConfigureVirtualFileSystem(); ConfigureFeatureManagement(); + ConfigureSettingManagement(); + ConfigurePermissionManagement(); ConfigureCaching(configuration); ConfigureAuditing(configuration); ConfigureIdentity(configuration); diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Dockerfile b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Dockerfile index b1da73049..a58e99b09 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Dockerfile +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Dockerfile @@ -4,10 +4,6 @@ WORKDIR /app COPY . /app -#东8区 -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json index 30b411b28..b4de68ba8 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/appsettings.Development.json @@ -25,9 +25,9 @@ } }, "ConnectionStrings": { - "Default": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456", - "Workflow": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456", - "WorkflowManagement": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456", + "Default": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456", + "Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456", + "WorkflowManagement": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456", "AbpWorkflowCore": "Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456", "AbpFeatureManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456", "AbpPermissionManagement": "Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456", diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/create-migrations-initial.sql b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/create-migrations-initial.sql index e3d96aa4b..60417c733 100644 --- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/create-migrations-initial.sql +++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/create-migrations-initial.sql @@ -1,5 +1,9 @@ -- basic script +CREATE DATABASE `Workflow-V70` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'; + +USE `Workflow-V70`; + CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( `MigrationId` varchar(150) CHARACTER SET utf8mb4 NOT NULL, `ProductVersion` varchar(32) CHARACTER SET utf8mb4 NOT NULL, diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 000000000..6d5f5e1a3 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/dotnet/aspnet:8.0 +LABEL maintainer="colin.in@foxmail.com" +WORKDIR /app + +COPY . /app + +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone + +EXPOSE 80/tcp +VOLUME [ "./app/Logs" ] +VOLUME [ "./app/Modules" ] + +ENTRYPOINT ["dotnet", "LINGYUN.MicroService.Internal.ApiGateway.dll"] \ No newline at end of file diff --git a/build/build-aspnetcore-common.ps1 b/build/build-aspnetcore-common.ps1 index 185aeea65..a98c1c375 100644 --- a/build/build-aspnetcore-common.ps1 +++ b/build/build-aspnetcore-common.ps1 @@ -28,7 +28,6 @@ $solutionArray += [PsObject]@{ File = $rootFolder + "/../aspnet-core/LINGYUN.Mic $solutionArray += [PsObject]@{ File = $rootFolder + "/../gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/LINGYUN.MicroService.Internal.ApiGateway.sln" } [PsObject[]]$migrationArray = @() -$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator" } $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.Platform.DbMigrator" } $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator" } $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator" } @@ -36,6 +35,7 @@ $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator" } $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator" } $migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.WebhooksManagement.DbMigrator" } +$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator" } #$migrationArray += [PsObject]@{ Path = $rootFolder + "/../aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator" } Write-host "" diff --git a/build/build-aspnetcore-release-sln.ps1 b/build/build-aspnetcore-release-sln.ps1 index 35124bde2..55f1cc5b1 100644 --- a/build/build-aspnetcore-release-sln.ps1 +++ b/build/build-aspnetcore-release-sln.ps1 @@ -1,9 +1,13 @@ . "./build-aspnetcore-common.ps1" # Build all solutions -foreach ($solution in $solutionArray) { - $publishPath = $rootFolder + "/../aspnet-core/services/Publish/" - dotnet publish -c Release -o $publishPath $solution.File --no-cache +foreach ($solution in $serviceArray) { + $publishPath = $rootFolder + "/../aspnet-core/services/Publish/" + $solution.Service + dotnet publish -c Release -o $publishPath $solution.Path --no-cache + $dockerFile = Join-Path $solution.Path "Dockerfile"; + if ((Test-Path $dockerFile)) { + Copy-Item $dockerFile -Destination $publishPath + } } Set-Location $rootFolder \ No newline at end of file diff --git a/deploy/.gitignore b/deploy/.gitignore new file mode 100644 index 000000000..1a0c587db --- /dev/null +++ b/deploy/.gitignore @@ -0,0 +1,2 @@ +framework +middleware diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 000000000..cfe704faf --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,11 @@ +### 注意事项 +> 仅作为演示部署,不建议用作生产环境,由此产生的任何问题,请自行负责. + +- 请修改本机hosts文件,加入如下条目 + +```shell +本机IP地址 auth-server +``` + +- 身份认证端点:http://auth-server:44385 +- 浏览器访问:http://localhost:40080 \ No newline at end of file diff --git a/deploy/deploy.ps1 b/deploy/deploy.ps1 new file mode 100644 index 000000000..f734d15f1 --- /dev/null +++ b/deploy/deploy.ps1 @@ -0,0 +1,58 @@ +. "../build/build-aspnetcore-common.ps1" + +Write-host "开始部署容器." + +$rootFolder = (Get-Item -Path "../" -Verbose).FullName +$deployPath = $rootFolder + "/deploy"; +$buildPath = $rootFolder + "/build"; +$aspnetcorePath = $rootFolder + "/aspnet-core"; +$vuePath = $rootFolder + "/apps/vue"; + +Write-host "root: " + $rootFolder + +## 部署中间件 +Write-host "deploy middleware..." +Set-Location $rootFolder +docker-compose -f .\docker-compose.middleware.yml up -d --build + +## 等待30秒, 数据库初始化完成 +Write-host "initial database..." +Start-Sleep -Seconds 30 +## 创建数据库 +Write-host "create database..." +Set-Location $aspnetcorePath +cmd.exe /c create-database.bat + +## 执行数据库迁移 +Write-host "migrate database..." +Set-Location $buildPath +foreach ($solution in $migrationArray) { + Set-Location $solution.Path + dotnet run +} + +## 发布程序包 +Write-host "release .net project..." +Set-Location $buildPath +foreach ($solution in $serviceArray) { + $publishPath = $rootFolder + "/aspnet-core/services/Publish/" + $solution.Service + "/" + dotnet publish -c Release -o $publishPath $solution.Path --no-cache + $dockerFile = Join-Path $solution.Path "Dockerfile" + if ((Test-Path $dockerFile)) { + Copy-Item $dockerFile -Destination $publishPath + } +} + +## 构建前端项目 +Write-host "build front project..." +Set-Location $vuePath +pnpm install +pnpm build + +## 运行应用程序 +Write-host "running application..." +Set-Location $rootFolder +docker-compose -f .\docker-compose.yml -f .\docker-compose.override.yml -f .\docker-compose.override.configuration.yml up -d --build + +Set-Location $deployPath +Write-host "application is running..." diff --git a/deploy/mysql/docker-entrypoint-initdb.d/agile-initial.sql b/deploy/mysql/docker-entrypoint-initdb.d/agile-initial.sql new file mode 100644 index 000000000..40964d112 --- /dev/null +++ b/deploy/mysql/docker-entrypoint-initdb.d/agile-initial.sql @@ -0,0 +1,3 @@ +-- basic script + +CREATE DATABASE `agile` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'; diff --git a/deploy/mysql/docker-entrypoint-initdb.d/elsa-migrations-initial.sql b/deploy/mysql/docker-entrypoint-initdb.d/elsa-migrations-initial.sql new file mode 100644 index 000000000..715d72e41 --- /dev/null +++ b/deploy/mysql/docker-entrypoint-initdb.d/elsa-migrations-initial.sql @@ -0,0 +1,317 @@ +-- basic script + +CREATE DATABASE `Workflow-V70` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'; + +USE `Workflow-V70`; + +CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( + `MigrationId` varchar(150) CHARACTER SET utf8mb4 NOT NULL, + `ProductVersion` varchar(32) CHARACTER SET utf8mb4 NOT NULL, + CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`) +) CHARACTER SET utf8mb4; + +START TRANSACTION; + +ALTER DATABASE CHARACTER SET utf8mb4; + +CREATE TABLE `Bookmarks` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Hash` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `Model` longtext CHARACTER SET utf8mb4 NOT NULL, + `ModelType` longtext CHARACTER SET utf8mb4 NOT NULL, + `ActivityType` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `ActivityId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `WorkflowInstanceId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `CorrelationId` varchar(255) CHARACTER SET utf8mb4 NULL, + CONSTRAINT `PK_Bookmarks` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE TABLE `WorkflowDefinitions` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `DefinitionId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Name` varchar(255) CHARACTER SET utf8mb4 NULL, + `DisplayName` longtext CHARACTER SET utf8mb4 NULL, + `Description` longtext CHARACTER SET utf8mb4 NULL, + `Version` int NOT NULL, + `IsSingleton` tinyint(1) NOT NULL, + `PersistenceBehavior` int NOT NULL, + `DeleteCompletedInstances` tinyint(1) NOT NULL, + `IsPublished` tinyint(1) NOT NULL, + `IsLatest` tinyint(1) NOT NULL, + `Tag` varchar(255) CHARACTER SET utf8mb4 NULL, + `Data` longtext CHARACTER SET utf8mb4 NULL, + CONSTRAINT `PK_WorkflowDefinitions` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE TABLE `WorkflowExecutionLogRecords` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `WorkflowInstanceId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `ActivityId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `ActivityType` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `Timestamp` datetime(6) NOT NULL, + `EventName` longtext CHARACTER SET utf8mb4 NULL, + `Message` longtext CHARACTER SET utf8mb4 NULL, + `Source` longtext CHARACTER SET utf8mb4 NULL, + `Data` longtext CHARACTER SET utf8mb4 NULL, + CONSTRAINT `PK_WorkflowExecutionLogRecords` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE TABLE `WorkflowInstances` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `DefinitionId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Version` int NOT NULL, + `WorkflowStatus` int NOT NULL, + `CorrelationId` varchar(255) CHARACTER SET utf8mb4 NULL, + `ContextType` varchar(255) CHARACTER SET utf8mb4 NULL, + `ContextId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Name` varchar(255) CHARACTER SET utf8mb4 NULL, + `CreatedAt` datetime(6) NOT NULL, + `LastExecutedAt` datetime(6) NULL, + `FinishedAt` datetime(6) NULL, + `CancelledAt` datetime(6) NULL, + `FaultedAt` datetime(6) NULL, + `Data` longtext CHARACTER SET utf8mb4 NULL, + CONSTRAINT `PK_WorkflowInstances` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE INDEX `IX_Bookmark_ActivityId` ON `Bookmarks` (`ActivityId`); + +CREATE INDEX `IX_Bookmark_ActivityType` ON `Bookmarks` (`ActivityType`); + +CREATE INDEX `IX_Bookmark_ActivityType_TenantId_Hash` ON `Bookmarks` (`ActivityType`, `TenantId`, `Hash`); + +CREATE INDEX `IX_Bookmark_CorrelationId` ON `Bookmarks` (`CorrelationId`); + +CREATE INDEX `IX_Bookmark_Hash` ON `Bookmarks` (`Hash`); + +CREATE INDEX `IX_Bookmark_Hash_CorrelationId_TenantId` ON `Bookmarks` (`Hash`, `CorrelationId`, `TenantId`); + +CREATE INDEX `IX_Bookmark_TenantId` ON `Bookmarks` (`TenantId`); + +CREATE INDEX `IX_Bookmark_WorkflowInstanceId` ON `Bookmarks` (`WorkflowInstanceId`); + +CREATE UNIQUE INDEX `IX_WorkflowDefinition_DefinitionId_VersionId` ON `WorkflowDefinitions` (`DefinitionId`, `Version`); + +CREATE INDEX `IX_WorkflowDefinition_IsLatest` ON `WorkflowDefinitions` (`IsLatest`); + +CREATE INDEX `IX_WorkflowDefinition_IsPublished` ON `WorkflowDefinitions` (`IsPublished`); + +CREATE INDEX `IX_WorkflowDefinition_Name` ON `WorkflowDefinitions` (`Name`); + +CREATE INDEX `IX_WorkflowDefinition_Tag` ON `WorkflowDefinitions` (`Tag`); + +CREATE INDEX `IX_WorkflowDefinition_TenantId` ON `WorkflowDefinitions` (`TenantId`); + +CREATE INDEX `IX_WorkflowDefinition_Version` ON `WorkflowDefinitions` (`Version`); + +CREATE INDEX `IX_WorkflowExecutionLogRecord_ActivityId` ON `WorkflowExecutionLogRecords` (`ActivityId`); + +CREATE INDEX `IX_WorkflowExecutionLogRecord_ActivityType` ON `WorkflowExecutionLogRecords` (`ActivityType`); + +CREATE INDEX `IX_WorkflowExecutionLogRecord_TenantId` ON `WorkflowExecutionLogRecords` (`TenantId`); + +CREATE INDEX `IX_WorkflowExecutionLogRecord_Timestamp` ON `WorkflowExecutionLogRecords` (`Timestamp`); + +CREATE INDEX `IX_WorkflowExecutionLogRecord_WorkflowInstanceId` ON `WorkflowExecutionLogRecords` (`WorkflowInstanceId`); + +CREATE INDEX `IX_WorkflowInstance_ContextId` ON `WorkflowInstances` (`ContextId`); + +CREATE INDEX `IX_WorkflowInstance_ContextType` ON `WorkflowInstances` (`ContextType`); + +CREATE INDEX `IX_WorkflowInstance_CorrelationId` ON `WorkflowInstances` (`CorrelationId`); + +CREATE INDEX `IX_WorkflowInstance_CreatedAt` ON `WorkflowInstances` (`CreatedAt`); + +CREATE INDEX `IX_WorkflowInstance_DefinitionId` ON `WorkflowInstances` (`DefinitionId`); + +CREATE INDEX `IX_WorkflowInstance_FaultedAt` ON `WorkflowInstances` (`FaultedAt`); + +CREATE INDEX `IX_WorkflowInstance_FinishedAt` ON `WorkflowInstances` (`FinishedAt`); + +CREATE INDEX `IX_WorkflowInstance_LastExecutedAt` ON `WorkflowInstances` (`LastExecutedAt`); + +CREATE INDEX `IX_WorkflowInstance_Name` ON `WorkflowInstances` (`Name`); + +CREATE INDEX `IX_WorkflowInstance_TenantId` ON `WorkflowInstances` (`TenantId`); + +CREATE INDEX `IX_WorkflowInstance_WorkflowStatus` ON `WorkflowInstances` (`WorkflowStatus`); + +CREATE INDEX `IX_WorkflowInstance_WorkflowStatus_DefinitionId` ON `WorkflowInstances` (`WorkflowStatus`, `DefinitionId`); + +CREATE INDEX `IX_WorkflowInstance_WorkflowStatus_DefinitionId_Version` ON `WorkflowInstances` (`WorkflowStatus`, `DefinitionId`, `Version`); + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20210523093427_Initial', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +ALTER TABLE `WorkflowInstances` MODIFY COLUMN `CorrelationId` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT ''; + +ALTER TABLE `WorkflowInstances` ADD `LastExecutedActivityId` longtext CHARACTER SET utf8mb4 NULL; + +ALTER TABLE `WorkflowDefinitions` ADD `OutputStorageProviderName` longtext CHARACTER SET utf8mb4 NULL; + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20210611200027_Update21', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +ALTER TABLE `WorkflowDefinitions` DROP COLUMN `OutputStorageProviderName`; + +ALTER TABLE `WorkflowInstances` RENAME `WorkflowInstances`; + +ALTER TABLE `WorkflowExecutionLogRecords` RENAME `WorkflowExecutionLogRecords`; + +ALTER TABLE `WorkflowDefinitions` RENAME `WorkflowDefinitions`; + +ALTER TABLE `Bookmarks` RENAME `Bookmarks`; + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20210923112211_Update23', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +ALTER TABLE `WorkflowInstances` ADD `DefinitionVersionId` longtext CHARACTER SET utf8mb4 NOT NULL; + +ALTER TABLE `Bookmarks` MODIFY COLUMN `CorrelationId` varchar(255) CHARACTER SET utf8mb4 NOT NULL DEFAULT ''; + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20211215100204_Update24', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +ALTER TABLE `WorkflowInstances` MODIFY COLUMN `DefinitionVersionId` varchar(255) CHARACTER SET utf8mb4 NOT NULL; + +CREATE INDEX `IX_WorkflowInstance_DefinitionVersionId` ON `WorkflowInstances` (`DefinitionVersionId`); + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20220120170050_Update241', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +CREATE TABLE `Triggers` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Hash` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `Model` longtext CHARACTER SET utf8mb4 NOT NULL, + `ModelType` longtext CHARACTER SET utf8mb4 NOT NULL, + `ActivityType` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `ActivityId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `WorkflowDefinitionId` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + CONSTRAINT `PK_Triggers` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE INDEX `IX_Trigger_ActivityId` ON `Triggers` (`ActivityId`); + +CREATE INDEX `IX_Trigger_ActivityType` ON `Triggers` (`ActivityType`); + +CREATE INDEX `IX_Trigger_ActivityType_TenantId_Hash` ON `Triggers` (`ActivityType`, `TenantId`, `Hash`); + +CREATE INDEX `IX_Trigger_Hash` ON `Triggers` (`Hash`); + +CREATE INDEX `IX_Trigger_Hash_TenantId` ON `Triggers` (`Hash`, `TenantId`); + +CREATE INDEX `IX_Trigger_TenantId` ON `Triggers` (`TenantId`); + +CREATE INDEX `IX_Trigger_WorkflowDefinitionId` ON `Triggers` (`WorkflowDefinitionId`); + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20220120204150_Update25', '5.0.10'); + +COMMIT; + +START TRANSACTION; + +ALTER TABLE `WorkflowDefinitions` ADD `CreatedAt` datetime(6) NOT NULL DEFAULT '0001-01-01 00:00:00'; + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20220512203646_Update28', '5.0.10'); + +COMMIT; + + +-- webhooks + +CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( + `MigrationId` varchar(150) CHARACTER SET utf8mb4 NOT NULL, + `ProductVersion` varchar(32) CHARACTER SET utf8mb4 NOT NULL, + CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`) +) CHARACTER SET utf8mb4; + +START TRANSACTION; + +ALTER DATABASE CHARACTER SET utf8mb4; + +CREATE TABLE `WebhookDefinitions` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `TenantId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Name` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `Path` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `Description` varchar(255) CHARACTER SET utf8mb4 NULL, + `PayloadTypeName` varchar(255) CHARACTER SET utf8mb4 NULL, + `IsEnabled` tinyint(1) NOT NULL, + CONSTRAINT `PK_WebhookDefinitions` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE INDEX `IX_WebhookDefinition_Description` ON `WebhookDefinitions` (`Description`); + +CREATE INDEX `IX_WebhookDefinition_IsEnabled` ON `WebhookDefinitions` (`IsEnabled`); + +CREATE INDEX `IX_WebhookDefinition_Name` ON `WebhookDefinitions` (`Name`); + +CREATE INDEX `IX_WebhookDefinition_Path` ON `WebhookDefinitions` (`Path`); + +CREATE INDEX `IX_WebhookDefinition_PayloadTypeName` ON `WebhookDefinitions` (`PayloadTypeName`); + +CREATE INDEX `IX_WebhookDefinition_TenantId` ON `WebhookDefinitions` (`TenantId`); + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20210604065041_Initial', '5.0.10'); + +COMMIT; + + +-- workflow-settings + +CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( + `MigrationId` varchar(150) CHARACTER SET utf8mb4 NOT NULL, + `ProductVersion` varchar(32) CHARACTER SET utf8mb4 NOT NULL, + CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`) +) CHARACTER SET utf8mb4; + +START TRANSACTION; + +ALTER DATABASE CHARACTER SET utf8mb4; + +CREATE TABLE `WorkflowSettings` ( + `Id` varchar(255) CHARACTER SET utf8mb4 NOT NULL, + `WorkflowBlueprintId` varchar(255) CHARACTER SET utf8mb4 NULL, + `Key` varchar(255) CHARACTER SET utf8mb4 NULL, + `Value` varchar(255) CHARACTER SET utf8mb4 NULL, + CONSTRAINT `PK_WorkflowSettings` PRIMARY KEY (`Id`) +) CHARACTER SET utf8mb4; + +CREATE INDEX `IX_WorkflowSetting_Key` ON `WorkflowSettings` (`Key`); + +CREATE INDEX `IX_WorkflowSetting_Value` ON `WorkflowSettings` (`Value`); + +CREATE INDEX `IX_WorkflowSetting_WorkflowBlueprintId` ON `WorkflowSettings` (`WorkflowBlueprintId`); + +INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`) +VALUES ('20210730112043_Initial', '5.0.10'); + +COMMIT; diff --git a/docker-compose.configuration.yml b/docker-compose.configuration.yml deleted file mode 100644 index dd8085e57..000000000 --- a/docker-compose.configuration.yml +++ /dev/null @@ -1,288 +0,0 @@ -version: '3.4' - -services: - sts-server: - environment: - - App__SelfUrl=http://127.0.0.1:44385/ - - App__CorsOrigins=http://127.0.0.1:9527,http://127.0.0.1:9528,http://127.0.0.1:40000,http://127.0.0.1:30000 - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentity=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentityServer=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpFeatureManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - Certificates__CerPath=./idsrv4.pfx - - Certificates__Password=csfvw2-2r0ff41 - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=AuthServer - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - IdentityServer__Clients__AuthManagement__ClientId=auth-management - - IdentityServer__Clients__AuthManagement__RootUrl=http://127.0.0.1:9527/ - - IdentityServer__Clients__AuthVueAdmin__ClientId=vue-admin-element - - IdentityServer__Clients__AuthApiGateway__ClientId=ApigatewayHostClient - - IdentityServer__Clients__AuthApiGatewayAdmin__ClientId=apigateway-admin-client - - sts-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentity=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentityServer=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpFeatureManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=IdentityServer4Admin - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - admin-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentity=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpIdentityServer=Server=127.0.0.1;Database=IdentityServer;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=BackendAdmin - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - localization-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpLocalizationManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=Localization-Management - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - platform-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AppPlatform=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpAuditLogging=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - RemoteServices__AbpIdentity__BaseUrl=http://127.0.0.1:30015/ - - RemoteServices__AbpIdentity__IdentityClient=InternalServiceClient - - IdentityClients__InternalServiceClient__Authority=http://127.0.0.1:44385/ - - IdentityClients__InternalServiceClient__RequireHttps=false - - IdentityClients__InternalServiceClient__GrantType=client_credentials - - IdentityClients__InternalServiceClient__Scope=lingyun-abp-application - - IdentityClients__InternalServiceClient__ClientId=internal-service-client - - IdentityClients__InternalServiceClient__ClientSecret=1q2w3e* - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - Features__Validation__Redis__Configuration=127.0.0.1,defaultDatabase=11 - - Features__Validation__Redis__InstanceName=LINGYUN.Abp.Application - - CAP__EventBus__DefaultGroup=Platform - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - messages-api: - environment: - - App__CorsOrigins=http://127.0.0.1:40000,http://127.0.0.1:30000 - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Messages;User Id=root;Password=123456 - - ConnectionStrings__MessageService=Server=127.0.0.1;Database=Messages;User Id=root;Password=123456 - - ConnectionStrings__AbpTenantManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform;User Id=root;Password=123456 - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=MessageService - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - Hangfire__MySql__Connection=Server=127.0.0.1;Database=Messages;User Id=root;Password=123456;Allow User Variables=true - - Hangfire__Dashboard__WhiteList=127.0.0.1 - - Notifications__WeChat__WeApp__DefaultWeAppState=formal - - task-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__TaskManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpFeatureManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpLocalizationManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSaas=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=TaskManagement - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - webhook-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__WebhooksManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__TaskManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSaas=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpFeatureManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=WebhooksManagement - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - workflow-api: - environment: - - App__TrackingEntitiesChanged=true - - ConnectionStrings__Default=Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456, - - ConnectionStrings__Workflow=Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456, - - ConnectionStrings__WorkflowManagement=Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456, - - ConnectionStrings__AbpWorkflowCore=Server=127.0.0.1;Database=Workflow;User Id=root;Password=123456, - - ConnectionStrings__AbpFeatureManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpPermissionManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpLocalizationManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSettingManagement=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - ConnectionStrings__AbpSaas=Server=127.0.0.1;Database=Platform-v70;User Id=root;Password=123456, - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - CAP__EventBus__DefaultGroup=Workflow - - CAP__EventBus__Version=v1 - - CAP__EventBus__FailedRetryInterval=300 - - CAP__EventBus__FailedRetryCount=10 - - CAP__RabbitMQ__HostName=127.0.0.1 - - CAP__RabbitMQ__Port=5672 - - CAP__RabbitMQ__UserName=admin - - CAP__RabbitMQ__Password=123456 - - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application - - CAP__RabbitMQ__VirtualHost=/ - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application - - internal-apigateway: - environment: - - App__TrackingEntitiesChanged=true - - Encryption__PassPhrase=s46c5q55nxpeS8Ra - - Encryption__InitVector=s83ng0abvd02js84 - - Encryption__Salt=sf&5)s3# - - Redis__Configuration=127.0.0.1,defaultDatabase=10 - - Redis__InstanceName=LINGYUN.Abp.Application - - AuthServer__Authority=http://127.0.0.1:44385/ - - AuthServer__ApiName=lingyun-abp-application diff --git a/docker-compose.middleware.yml b/docker-compose.middleware.yml new file mode 100644 index 000000000..c86aee239 --- /dev/null +++ b/docker-compose.middleware.yml @@ -0,0 +1,110 @@ +version: '3.4' + +services: + abp-redis: + image: redis:6 + hostname: abp-redis + container_name: abp-redis + environment: + - TZ=Asia/Shanghai + volumes: + - ./deploy/middleware/redis/data:/data + ports: + - "6379:6379" + restart: always + networks: + - abp-next-admin + + abp-mysql: + image: mysql + hostname: abp-mysql + container_name: abp-mysql + ports: + - "3306:3306" + environment: + - MYSQL_ROOT_PASSWORD=123456 + - MYSQL_ROOT_HOST=% + - TZ=Asia/Shanghai + command: + --default-authentication-plugin=mysql_native_password + --character-set-server=utf8mb4 + --collation-server=utf8mb4_general_ci + --lower_case_table_names=1 + --max_connections=1024 + volumes: + - ./deploy/middleware/mysql/data:/var/lib/mysql + - ./deploy/middleware/mysql/conf:/etc/mysql/conf.d + - ./deploy/middleware/mysql/logs:/logs + - ./deploy/mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + restart: always + networks: + - abp-next-admin + + abp-rabbitmq: + image: rabbitmq:management + hostname: abp-rabbitmq + container_name: abp-rabbitmq + ports: + - "5672:5672" + - "15672:15672" + - "25672:25672" + environment: + - RABBITMQ_ERLANG_COOKIE=8ue48g9FJQ87YV9Hfd8yhg== + - RABBITMQ_DEFAULT_VHOST=/ + - RABBITMQ_DEFAULT_USER=admin + - RABBITMQ_DEFAULT_PASS=123456 + - TZ=Asia/Shanghai + volumes: + - ./deploy/middleware/rabbitmq/logs:/var/log/rabbitmq + - ./deploy/middleware/rabbitmq/data:/var/lib/rabbitmq + restart: always + networks: + - abp-next-admin + + abp-elasticsearch: + image: elasticsearch:7.16.3 + container_name: abp-elasticsearch + restart: always + environment: + - "cluster.name=elasticsearch" + - "discovery.type=single-node" + - "ES_JAVA_OPTS=-Xms15g -Xmx15g" + volumes: + - ./deploy/middleware/elasticsearch/plugins:/usr/share/elasticsearch/plugins + - ./deploy/middleware/elasticsearch/data:/usr/share/elasticsearch/data + ports: + - 9200:9200 + networks: + - abp-next-admin + + abp-kibana: + image: kibana:7.16.3 + container_name: abp-kibana + restart: always + depends_on: + - abp-elasticsearch + environment: + - ELASTICSEARCH_URL=http://host.docker.internal:9200 + ports: + - 5601:5601 + networks: + - abp-next-admin + extra_hosts: + - "host.docker.internal:host-gateway" + + abp-logstash: + image: logstash:7.16.3 + container_name: abp-logstash + restart: always + depends_on: + - abp-elasticsearch + links: + - abp-elasticsearch:es + ports: + - 4560:4560 + networks: + - abp-next-admin + +networks: + abp-next-admin: + driver: bridge diff --git a/docker-compose.agile.config.yml b/docker-compose.override.agile.yml similarity index 95% rename from docker-compose.agile.config.yml rename to docker-compose.override.agile.yml index d22ed913e..2e82dd227 100644 --- a/docker-compose.agile.config.yml +++ b/docker-compose.override.agile.yml @@ -7,11 +7,10 @@ services: environment: - adminConsole=true - db:provider=mysql - - db:conn=Server=host.docker.internal;Database=agile;User Id=root;Password=123456;Character Set=utf8mb4 + - db:conn=Server=abp-mysql;Database=agile;User Id=root;Password=123456;Character Set=utf8mb4 + - TZ=Asia/Shanghai ports: - "5000:5000" - volumes: - - /etc/localtime:/etc/localtime sts-server: environment: @@ -130,5 +129,6 @@ services: - AgileConfig__nodes=http://agile-config:5000 - AgileConfig__name=ApiGateway - AgileConfig__tag=ApiGateway + - TZ=Asia/Shanghai depends_on: - agile-config diff --git a/docker-compose.override.configuration.yml b/docker-compose.override.configuration.yml new file mode 100644 index 000000000..7f17eedb2 --- /dev/null +++ b/docker-compose.override.configuration.yml @@ -0,0 +1,509 @@ +version: '3.4' + +services: + sts-server: + environment: + - AgileConfig__IsEnabled=false + - App__SelfUrl=http://auth-server:44385/ + - App__RefreshClaimsUrl=http://host.docker.internal-api:30015 + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - Auditing__AllEntitiesSelector=true + - ConnectionStrings__Default=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=AuthServer + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=auth + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + - IdentityServer__Clients__InternalService__ClientId=InternalServiceClient + - IdentityServer__Clients__AuthVueAdmin__ClientId=vue-admin-client + - IdentityServer__Clients__AuthVueAdmin__RootUrl=http://localhost:3100/ + + sts-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=IdentityServer4Admin + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=ida + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + admin-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=BackendAdmin + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=admin + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__MinimumLevel__Default=Debug + - Serilog__Override__System=Debug + - Serilog__Override__Microsoft=Debug + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + localization-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=Localization-Management + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=lta + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + platform-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - RemoteServices__AbpIdentity__BaseUrl=http://sts-api:30015/ + - RemoteServices__AbpIdentity__IdentityClient=InternalServiceClient + - IdentityClients__InternalServiceClient__Authority=http://auth-server:44385/ + - IdentityClients__InternalServiceClient__RequireHttps=false + - IdentityClients__InternalServiceClient__GrantType=client_credentials + - IdentityClients__InternalServiceClient__Scope=lingyun-abp-application + - IdentityClients__InternalServiceClient__ClientId=internal-service-client + - IdentityClients__InternalServiceClient__ClientSecret=1q2w3e* + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - Features__Validation__Redis__Configuration=host.docker.internal,defaultDatabase=11 + - Features__Validation__Redis__InstanceName=LINGYUN.Abp.Application + - CAP__EventBus__DefaultGroup=Platform + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=platform + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + messages-api: + environment: + - AgileConfig__IsEnabled=false + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - Auditing__AllEntitiesSelector=true + - ConnectionStrings__Default=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=MessageService + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=messages + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + - Notifications__WeChat__WeApp__DefaultWeAppState=formal + + task-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=TaskManagement + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=messages + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + webhook-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - CAP__EventBus__DefaultGroup=WebhooksManagement + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=webhook + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + workflow-api: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - ConnectionStrings__Default=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpAuditLogging=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpOpenIddict=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentity=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpIdentityServer=Server=host.docker.internal;Database=IdentityServer-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSaas=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTenantManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpFeatureManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpSettingManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpPermissionManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpLocalizationManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__AbpTextTemplating=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__TaskManagement=Server=host.docker.internal;Database=Platform-V70;User Id=root;Password=123456 + - ConnectionStrings__Workflow=Server=host.docker.internal;Database=Workflow-V70;User Id=root;Password=123456 + - ConnectionStrings__Notifications=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - ConnectionStrings__MessageService=Server=host.docker.internal;Database=Messages-V70;User Id=root;Password=123456 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - Elsa__Rebus__RabbitMQ__Connection=amqp://admin:123456@host.docker.internal:5672/ + - CAP__EventBus__DefaultGroup=Workflow + - CAP__EventBus__Version=v1 + - CAP__EventBus__FailedRetryInterval=300 + - CAP__EventBus__FailedRetryCount=10 + - CAP__RabbitMQ__HostName=host.docker.internal + - CAP__RabbitMQ__Port=5672 + - CAP__RabbitMQ__UserName=admin + - CAP__RabbitMQ__Password=123456 + - CAP__RabbitMQ__ExchangeName=LINGYUN.Abp.Application + - CAP__RabbitMQ__VirtualHost=/ + - CAP__MySql__TableNamePrefix=workflow + - CAP__MySql__ConnectionString=Server=host.docker.internal;Database=Platform-v70;User Id=root;Password=123456 + - DistributedCache__HideErrors=true + - DistributedCache__KeyPrefix=LINGYUN.Abp.Application + - DistributedCache__GlobalCacheEntryOptions__SlidingExpiration=30:00:00 + - DistributedCache__GlobalCacheEntryOptions__AbsoluteExpirationRelativeToNow=60:00:00 + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - RemoteServices__AbpOssManagement__BaseUrl=http://platform:30025 + - RemoteServices__AbpOssManagement__IdentityClient=InternalServiceClient + - RemoteServices__AbpOssManagement__UseCurrentAccessToken=false + - IdentityClients__InternalServiceClient__Authority=http://auth-server:44385/ + - IdentityClients__InternalServiceClient__GrantType=client_credentials + - IdentityClients__InternalServiceClient__Scope=lingyun-abp-application + - IdentityClients__InternalServiceClient__ClientId=InternalServiceClient + - IdentityClients__InternalServiceClient__ClientSecret=1q2w3e* + - IdentityClients__InternalServiceClient__RequireHttps=false + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application + + internal-apigateway: + environment: + - AgileConfig__IsEnabled=false + - Auditing__AllEntitiesSelector=true + - App__CorsOrigins=http://localhost:3100,http://localhost:30000,http://apigateway:30000 + - Encryption__PassPhrase=s46c5q55nxpeS8Ra + - Encryption__InitVector=s83ng0abvd02js84 + - Encryption__Salt=sf&5)s3# + - DistributedLock__IsEnabled=true + - DistributedLock__Redis__Configuration=host.docker.internal,defaultDatabase=13 + - Elasticsearch__NodeUris=http://host.docker.internal:9200 + - Serilog__WriteTo__0__Name=Console + - Serilog__WriteTo__1__Name=Elasticsearch + - Serilog__WriteTo__1__Args__nodeUris=http://host.docker.internal:9200 + - Redis__Configuration=host.docker.internal,defaultDatabase=10 + - Redis__InstanceName=LINGYUN.Abp.Application + - AuthServer__Authority=http://auth-server:44385 + - AuthServer__ApiName=lingyun-abp-application diff --git a/docker-compose.override.windows.yml b/docker-compose.override.windows.yml deleted file mode 100644 index 29f7e405e..000000000 --- a/docker-compose.override.windows.yml +++ /dev/null @@ -1,117 +0,0 @@ -version: '3.4' - -services: - sts-server: - build: - context: ./aspnet-core/services/Publish/identityserver - volumes: - - D:\Projects\Development\Abp\Application\logs\ids-sts:/app/Logs - - D:\Projects\Development\Abp\Application\data\ids-sts\Modules:/app/Modules - networks: - - framework - - sts-api: - build: - context: ./aspnet-core/services/Publish/identityserver4-admin - volumes: - - D:\Projects\Development\Abp\Application\logs\ids-admin:/app/Logs - - D:\Projects\Development\Abp\Application\data\ids-admin\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - admin-api: - build: - context: ./aspnet-core/services/Publish/admin - volumes: - - D:\Projects\Development\Abp\Application\logs\backend-admin:/app/Logs - - D:\Projects\Development\Abp\Application\data\backend-admin\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - localization-api: - build: - context: ./aspnet-core/services/Publish/localization - volumes: - - D:\Projects\Development\Abp\Application\logs\localization:/app/Logs - - D:\Projects\Development\Abp\Application\data\localization\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - platform-api: - build: - context: ./aspnet-core/services/Publish/platform - volumes: - - D:\Projects\Development\Abp\Application\logs\platform:/app/Logs - - D:\Projects\Development\Abp\Application\data\platform\Modules:/app/Modules - - D:\Projects\Development\Abp\Application\data\platform:/app/file-blob-storing - depends_on: - - sts-server - networks: - - framework - - messages-api: - build: - context: ./aspnet-core/services/Publish/messages - volumes: - - D:\Projects\Development\Abp\Application\logs\messages:/app/Logs - - D:\Projects\Development\Abp\Application\data\messages\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - task-api: - build: - context: ./aspnet-core/services/Publish/task-management - volumes: - - D:\Projects\Development\Abp\Application\logs\task-management:/app/Logs - - D:\Projects\Development\Abp\Application\data\task-management\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - webhook-api: - build: - context: ./aspnet-core/services/Publish/webhooks - volumes: - - D:\Projects\Development\Abp\Application\logs\webhooks:/app/Logs - - D:\Projects\Development\Abp\Application\data\webhooks\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - workflow-api: - build: - context: ./aspnet-core/services/Publish/workflow - volumes: - - D:\Projects\Development\Abp\Application\logs\workflow:/app/Logs - - D:\Projects\Development\Abp\Application\data\workflow\Modules:/app/Modules - depends_on: - - sts-server - networks: - - framework - - internal-apigateway: - build: - context: ./aspnet-core/services/Publish/internal-apigateway - volumes: - - D:\Projects\Development\Abp\Application\logs\internal-apigateway:/app/Logs - - D:\Projects\Development\Abp\Application\data\internal-apigateway\Modules:/app/Modules - networks: - - framework - -volumes: - dbdata: - -networks: - framework: - name: linyun-abp - external: true diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 6e5cd5588..00875d317 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -5,110 +5,100 @@ services: build: context: ./aspnet-core/services/Publish/identityserver volumes: - - /var/opt/abp/logs/ids-sts:/app/Logs - - /var/opt/abp/data/ids-sts/Modules:/app/Modules - networks: - - framework + - ./deploy/framework/ids-sts/logs:/app/Logs + - ./deploy/framework/ids-sts/modules:/app/Modules + restart: always sts-api: build: context: ./aspnet-core/services/Publish/identityserver4-admin volumes: - - /var/opt/abp/logs/ids-admin:/app/Logs - - /var/opt/abp/data/ids-admin/Modules:/app/Modules + - ./deploy/framework/ids-admin/logs:/app/Logs + - ./deploy/framework/ids-admin/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework admin-api: build: context: ./aspnet-core/services/Publish/admin volumes: - - /var/opt/abp/logs/backend-admin:/app/Logs - - /var/opt/abp/data/backend-admin/Modules:/app/Modules + - ./deploy/framework/ids-admin/logs:/app/Logs + - ./deploy/framework/ids-admin/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework localization-api: build: context: ./aspnet-core/services/Publish/localization volumes: - - /var/opt/abp/logs/localization:/app/Logs - - /var/opt/abp/data/localization/Modules:/app/Modules + - ./deploy/framework/localization/logs:/app/Logs + - ./deploy/framework/localization/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework platform-api: build: context: ./aspnet-core/services/Publish/platform volumes: - - /var/opt/abp/logs/platform:/app/Logs - - /var/opt/abp/data/platform/Modules:/app/Modules - - /var/opt/abp/data/platform:/app/file-blob-storing + - ./deploy/framework/platform/logs:/app/Logs + - ./deploy/framework/platform/modules:/app/Modules + - ./deploy/framework/platform/blobs:/app/file-blob-storing + restart: always depends_on: - sts-server - networks: - - framework messages-api: build: context: ./aspnet-core/services/Publish/messages volumes: - - /var/opt/abp/logs/messages:/app/Logs - - /var/opt/abp/data/messages/Modules:/app/Modules + - ./deploy/framework/messages/logs:/app/Logs + - ./deploy/framework/messages/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework task-api: build: context: ./aspnet-core/services/Publish/task-management volumes: - - /var/opt/abp/logs/task-management:/app/Logs - - /var/opt/abp/data/task-management/Modules:/app/Modules + - ./deploy/framework/task/logs:/app/Logs + - ./deploy/framework/task/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework webhook-api: build: context: ./aspnet-core/services/Publish/webhooks volumes: - - /var/opt/abp/logs/webhooks:/app/Logs - - /var/opt/abp/data/webhooks/Modules:/app/Modules + - ./deploy/framework/webhook/logs:/app/Logs + - ./deploy/framework/webhook/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework workflow-api: build: context: ./aspnet-core/services/Publish/workflow volumes: - - /var/opt/abp/logs/workflow:/app/Logs - - /var/opt/abp/data/workflow/Modules:/app/Modules + - ./deploy/framework/workflow/logs:/app/Logs + - ./deploy/framework/workflow/modules:/app/Modules + restart: always depends_on: - sts-server - networks: - - framework internal-apigateway: build: context: ./aspnet-core/services/Publish/internal-apigateway volumes: - - /var/opt/abp/logs/internal-apigateway:/app/Logs - - /var/opt/abp/data/internal-apigateway/Modules:/app/Modules - networks: - - framework + - ./deploy/framework/apigateway/logs:/app/Logs + - ./deploy/framework/apigateway/modules:/app/Modules + restart: always -networks: - framework: - name: linyun-abp - external: true + ui: + build: + context: ./apps/vue + restart: always diff --git a/docker-compose.yml b/docker-compose.yml index e561db2e8..8e851056a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,91 +2,176 @@ version: '3.4' services: admin-api: + hostname: admin + container_name: admin environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30010:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" sts-api: + hostname: auth-server-api + container_name: auth-server-api environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30015:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" localization-api: + hostname: localization + container_name: localization environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30030:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" platform-api: + hostname: platform + container_name: platform environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30025:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" messages-api: + hostname: messages + container_name: messages environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30020:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" task-api: + hostname: task + container_name: task environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30040:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" webhook-api: + hostname: webhook + container_name: webhook environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30045:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" workflow-api: + hostname: workflow + container_name: workflow environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30050:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" sts-server: + hostname: auth-server + container_name: auth-server environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "44385:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" internal-apigateway: + hostname: apigateway + container_name: apigateway environment: - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 + - ASPNETCORE_HTTP_PORTS=80 + - TZ=Asia/Shanghai ports: - "30000:80" + networks: + - abp-next-admin extra_hosts: - "host.docker.internal:host-gateway" + - "auth-server:host-gateway" + - "auth-server-api:host-gateway" + - "localization:host-gateway" + - "workflow:host-gateway" + - "webhook:host-gateway" + - "messages:host-gateway" + - "platform:host-gateway" + - "task:host-gateway" + - "admin:host-gateway" + + ui: + restart: always + environment: + - VITE_GLOB_AUTHORITY=http://apigateway:44385 + ports: + - "40080:80" + networks: + - abp-next-admin + extra_hosts: + - "host.docker.internal:host-gateway" + - "apigateway:host-gateway" + - "auth-server:host-gateway" + +networks: + abp-next-admin: + driver: bridge diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile index 7ba04ea9b..0023fbee1 100644 --- a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Dockerfile @@ -4,9 +4,6 @@ WORKDIR /app COPY . /app -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone - EXPOSE 80/tcp VOLUME [ "./app/Logs" ] VOLUME [ "./app/Modules" ] diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/InternalApiGatewayModule.cs b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/InternalApiGatewayModule.cs index 52df4aec7..3cfc89770 100644 --- a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/InternalApiGatewayModule.cs +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/InternalApiGatewayModule.cs @@ -1,28 +1,28 @@ using LINGYUN.Abp.Serilog.Enrichers.Application; using LINGYUN.Abp.Serilog.Enrichers.UniqueId; using Microsoft.AspNetCore.Builder; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Ocelot.Middleware; using Volo.Abp; using Volo.Abp.AspNetCore.Serilog; -using Volo.Abp.Autofac; +using Volo.Abp.Autofac; using Volo.Abp.Caching.StackExchangeRedis; -using Volo.Abp.Modularity; - -namespace LINGYUN.MicroService.Internal.ApiGateway -{ - - [DependsOn( - typeof(AbpAutofacModule), - typeof(AbpSerilogEnrichersApplicationModule), - typeof(AbpSerilogEnrichersUniqueIdModule), - typeof(AbpCachingStackExchangeRedisModule), - typeof(AbpAspNetCoreSerilogModule) - )] - public partial class InternalApiGatewayModule : AbpModule - { +using Volo.Abp.Modularity; + +namespace LINGYUN.MicroService.Internal.ApiGateway +{ + + [DependsOn( + typeof(AbpAutofacModule), + typeof(AbpSerilogEnrichersApplicationModule), + typeof(AbpSerilogEnrichersUniqueIdModule), + typeof(AbpCachingStackExchangeRedisModule), + typeof(AbpAspNetCoreSerilogModule) + )] + public partial class InternalApiGatewayModule : AbpModule + { public override void PreConfigureServices(ServiceConfigurationContext context) { var configuration = context.Services.GetConfiguration(); @@ -82,6 +82,6 @@ public override void OnApplicationInitialization(ApplicationInitializationContex app.UseWebSockets(); app.UseAbpSerilogEnrichers(); app.UseOcelot().Wait(); - } - } -} + } + } +} diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs index 286bb3dd1..46b26b59d 100644 --- a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/Program.cs @@ -1,16 +1,17 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; -using System; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Serilog; +using System; using System.IO; using System.Threading.Tasks; using Volo.Abp.IO; using Volo.Abp.Modularity.PlugIns; -namespace LINGYUN.MicroService.Internal.ApiGateway; - +namespace LINGYUN.MicroService.Internal.ApiGateway; + public class Program { public async static Task Main(string[] args) @@ -31,7 +32,11 @@ public async static Task Main(string[] args) { config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration)); } - + config.AddJsonFile("ocelot.json", optional: true, reloadOnChange: true); + if (!context.HostingEnvironment.EnvironmentName.IsNullOrWhiteSpace()) + { + config.AddJsonFile($"ocelot.{context.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true); + } }) .UseSerilog((context, provider, config) => { @@ -65,4 +70,4 @@ await builder.AddApplicationAsync(options => Log.CloseAndFlush(); } } -} +} diff --git a/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json new file mode 100644 index 000000000..9e26dfeeb --- /dev/null +++ b/gateways/internal/LINGYUN.MicroService.Internal.ApiGateway/src/LINGYUN.MicroService.Internal.ApiGateway/ocelot.Development.json @@ -0,0 +1 @@ +{} \ No newline at end of file