diff --git a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs index eac5bbf90..baffec853 100644 --- a/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs +++ b/aspnet-core/services/account/AuthServer.Host/AuthIdentityServerModule.cs @@ -169,9 +169,6 @@ namespace AuthServer.Host app.UseIdentityServer(); app.UseAuditing(); - // 处理微信消息 - // app.UseWeChatSignature(); - SeedData(context); } diff --git a/aspnet-core/services/account/AuthServer.Host/IdentityServer/IdentityServerDataSeedContributor.cs b/aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs similarity index 99% rename from aspnet-core/services/account/AuthServer.Host/IdentityServer/IdentityServerDataSeedContributor.cs rename to aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs index 5356e5842..97be35b65 100644 --- a/aspnet-core/services/account/AuthServer.Host/IdentityServer/IdentityServerDataSeedContributor.cs +++ b/aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs @@ -16,7 +16,7 @@ using Volo.Abp.IdentityServer.IdentityResources; using Volo.Abp.PermissionManagement; using Volo.Abp.Uow; -namespace Multicolin.Aftermarket.IdentityServer +namespace AuthServer.DataSeeder { public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency { diff --git a/aspnet-core/services/account/AuthServer.Host/Dockerfile b/aspnet-core/services/account/AuthServer.Host/Dockerfile new file mode 100644 index 000000000..732cff2c6 --- /dev/null +++ b/aspnet-core/services/account/AuthServer.Host/Dockerfile @@ -0,0 +1,10 @@ +FROM mcr.microsoft.com/dotnet/core/runtime:3.1 AS runtime +LABEL maintainer="colin.in@foxmail.com" +WORKDIR /app + +COPY . /app +COPY ../../../configuration/account/AuthServer.Host/appsettings.Development.json /app/appsettings.Development.json + +EXPOSE 80/tcp + +ENTRYPOINT ["dotnet", "AuthServer.Host.dll"] \ No newline at end of file diff --git a/aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs b/aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs index 0048e3e7f..58cde89b4 100644 --- a/aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs +++ b/aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs @@ -30,6 +30,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Autofac; using Volo.Abp.Caching; +using Volo.Abp.Data; using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.MySQL; using Volo.Abp.Identity.EntityFrameworkCore; @@ -47,6 +48,7 @@ using Volo.Abp.Security.Claims; using Volo.Abp.Security.Encryption; using Volo.Abp.SettingManagement.EntityFrameworkCore; using Volo.Abp.TenantManagement.EntityFrameworkCore; +using Volo.Abp.Threading; using Volo.Abp.VirtualFileSystem; namespace LINGYUN.BackendAdmin @@ -250,8 +252,21 @@ namespace LINGYUN.BackendAdmin }); // 审计日志 app.UseAuditing(); + // 处理微信消息 + // app.UseWeChatSignature(); // 路由 app.UseConfiguredEndpoints(); + + SeedData(context); + } + + private void SeedData(ApplicationInitializationContext context) + { + AsyncHelper.RunSync(async () => + { + using var scope = context.ServiceProvider.CreateScope(); + await scope.ServiceProvider.GetRequiredService().SeedAsync(); + }); } } }