Browse Source

feat: 添加 PostgreSQL 支持的迁移

pull/1048/head
feijie 1 year ago
parent
commit
115f414671
  1. 9
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs
  2. 8
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/SingleDbMigratorModule.cs
  3. 245
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.PostgreSql.json
  4. 26
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.csproj
  5. 33
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/SingleMigrationsDbContextFactory.cs
  6. 23
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/SingleMigrationsEntityFrameworkCorePostgreSqlModule.cs
  7. 5
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
  8. 13
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
  9. 262
      aspnet-core/services/LY.MicroService.Applications.Single/appsettings.PostgreSql.json
  10. 6
      common.props

9
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/Program.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Serilog; using Serilog;
@ -23,7 +24,6 @@ public class Program
.WriteTo.Console() .WriteTo.Console()
.WriteTo.File("Logs/migrations.txt") .WriteTo.File("Logs/migrations.txt")
.CreateLogger(); .CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync(); await CreateHostBuilder(args).RunConsoleAsync();
} }
@ -31,6 +31,11 @@ public class Program
{ {
return Host.CreateDefaultBuilder(args) return Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson() .AddAppSettingsSecretsJson()
// .ConfigureAppConfiguration((context, builder) =>
// {
// builder.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
// .AddJsonFile($"appsettings.{context.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true);
// } )
.ConfigureLogging((context, logging) => logging.ClearProviders()) .ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) => .ConfigureServices((hostContext, services) =>
{ {

8
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/SingleDbMigratorModule.cs

@ -1,5 +1,9 @@
using LINGYUN.Abp.UI.Navigation.VueVbenAdmin; using LINGYUN.Abp.UI.Navigation.VueVbenAdmin;
#if POSTGRESQL
using LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql;
#else
using LY.MicroService.Applications.Single.EntityFrameworkCore; using LY.MicroService.Applications.Single.EntityFrameworkCore;
#endif
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
@ -7,7 +11,11 @@ namespace LY.MicroService.Applications.Single.DbMigrator;
[DependsOn( [DependsOn(
typeof(AbpUINavigationVueVbenAdminModule), typeof(AbpUINavigationVueVbenAdminModule),
#if POSTGRESQL
typeof(SingleMigrationsEntityFrameworkCorePostgreSqlModule),
#else
typeof(SingleMigrationsEntityFrameworkCoreModule), typeof(SingleMigrationsEntityFrameworkCoreModule),
#endif
typeof(AbpAutofacModule) typeof(AbpAutofacModule)
)] )]
public partial class SingleDbMigratorModule : AbpModule public partial class SingleDbMigratorModule : AbpModule

245
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.PostgreSql.json

@ -0,0 +1,245 @@
{
"App": {
"ShowPii": true,
"SelfUrl": "http://127.0.0.1:30001/",
"CorsOrigins": "http://127.0.0.1:3100,http://127.0.0.1:30001",
"Urls": {
"Applications": {
"MVC": {
"RootUrl": "http://127.0.0.1:30001/",
"Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
}
},
"STS": {
"RootUrl": "http://127.0.0.1:30001/"
},
"VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:3100",
"Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm"
}
}
}
}
},
"Auditing": {
"AllEntitiesSelector": true
},
"DistributedCache": {
"HideErrors": true,
"KeyPrefix": "LINGYUN.Abp.Application",
"GlobalCacheEntryOptions": {
"SlidingExpiration": "30:00:00",
"AbsoluteExpirationRelativeToNow": "60:00:00"
}
},
"ConnectionStrings": {
"Default": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpAuditLogging": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpOpenIddict": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpIdentity": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpIdentityServer": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpSaas": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpTenantManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpFeatureManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpSettingManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpPermissionManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpLocalizationManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpTextTemplating": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AppPlatform": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"TaskManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Workflow": "Host=127.0.0.1;Database=Workflow-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Notifications": "Host=127.0.0.1;Database=Messages-V70;Username=postgres;Password=123456;SslMode=Prefer",
"MessageService": "Host=127.0.0.1;Database=Messages-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Demo": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=14"
}
},
"Elsa": {
"Features": {
"DefaultPersistence": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"MySql": {
"Enabled": true
}
}
},
"Console": true,
"Http": true,
"Email": true,
"TemporalQuartz": true,
"JavaScriptActivities": true,
"UserTask": true,
"Conductor": true,
"Telnyx": true,
"BlobStoring": true,
"Emailing": true,
"Notification": true,
"Sms": true,
"IM": true,
"PublishWebhook": true,
"Webhooks": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"MySql": {
"Enabled": true
}
}
},
"WorkflowSettings": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"MySql": {
"Enabled": true
}
}
}
},
"Server": {
"BaseUrl": "http://127.0.0.1:30000"
}
},
"Quartz": {
"UsePersistentStore": false,
"Properties": {
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.PostgreSQLDelegate, Quartz",
"quartz.dataSource.tkm.connectionString": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;",
"quartz.dataSource.tkm.provider": "Npgsql",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement"
}
},
"Redis": {
"IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=15",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"UseOpenIddict": true,
"Authority": "http://127.0.0.1:30001/",
"ApiName": "lingyun-abp-application",
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
},
"IdentityServer": {
"Clients": {
"VueAdmin": {
"ClientId": "vue-admin-client",
"RootUrl": "http://127.0.0.1:3100/"
},
"InternalService": {
"ClientId": "InternalServiceClient"
}
}
},
"OpenIddict": {
"Applications": {
"VueAdmin": {
"ClientId": "vue-admin-client",
"RootUrl": "http://127.0.0.1:3100/"
},
"InternalService": {
"ClientId": "InternalServiceClient"
}
},
"Lifetime": {
"AuthorizationCode": "00:05:00",
"AccessToken": "14:00:00",
"DeviceCode": "00:10:00",
"IdentityToken": "00:20:00",
"RefreshToken": "14:00:00",
"RefreshTokenReuseLeeway": "00:00:30",
"UserCode": "00:10:00"
}
},
"Identity": {
"Password": {
"RequiredLength": 6,
"RequiredUniqueChars": 0,
"RequireNonAlphanumeric": false,
"RequireLowercase": false,
"RequireUppercase": false,
"RequireDigit": false
},
"Lockout": {
"AllowedForNewUsers": false,
"LockoutDuration": 5,
"MaxFailedAccessAttempts": 5
},
"SignIn": {
"RequireConfirmedEmail": false,
"RequireConfirmedPhoneNumber": false
}
},
"FeatureManagement": {
"IsDynamicStoreEnabled": true
},
"SettingManagement": {
"IsDynamicStoreEnabled": true
},
"PermissionManagement": {
"IsDynamicStoreEnabled": true
},
"TextTemplating": {
"IsDynamicStoreEnabled": true
},
"WebhooksManagement": {
"IsDynamicStoreEnabled": true
},
"Logging": {
"Serilog": {
"Elasticsearch": {
"IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}"
}
}
},
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "abp.dev.auditing"
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"DotNetCore": "Debug"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Debug",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"
}
}
]
}
}

26
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

33
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/SingleMigrationsDbContextFactory.cs

@ -0,0 +1,33 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql;
public class SingleMigrationsDbContextFactory : IDesignTimeDbContextFactory<SingleMigrationsDbContext>
{
public SingleMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<SingleMigrationsDbContext>()
.UseNpgsql(connectionString, b => b.MigrationsAssembly("LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql"));
return new SingleMigrationsDbContext(builder!.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Applications.Single.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false)
#if POSTGRESQL
.AddJsonFile("appsettings.PostgreSql.json", optional: false)
#endif
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}

23
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql/SingleMigrationsEntityFrameworkCorePostgreSqlModule.cs

@ -0,0 +1,23 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Modularity;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql;
[DependsOn(
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(SingleMigrationsEntityFrameworkCoreModule)
)]
public class SingleMigrationsEntityFrameworkCorePostgreSqlModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SingleMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseNpgsql();
});
}
}

5
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs

@ -570,7 +570,12 @@ public partial class MicroServiceApplicationsSingleModule
{ {
Configure<AbpDbContextOptions>(options => Configure<AbpDbContextOptions>(options =>
{ {
#if POSTGRESQL
options.UseNpgsql();
#else
options.UseMySQL(); options.UseMySQL();
#endif
}); });
} }

13
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -29,7 +29,12 @@ using LINGYUN.Abp.Demo.EntityFrameworkCore;
using LINGYUN.Abp.Elsa; using LINGYUN.Abp.Elsa;
using LINGYUN.Abp.Elsa.Activities; using LINGYUN.Abp.Elsa.Activities;
using LINGYUN.Abp.Elsa.EntityFrameworkCore; using LINGYUN.Abp.Elsa.EntityFrameworkCore;
#if POSTGRESQL
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql;
#else
using LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql; using LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql;
#endif
using LINGYUN.Abp.ExceptionHandling; using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing; using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Exporter.MiniExcel; using LINGYUN.Abp.Exporter.MiniExcel;
@ -238,7 +243,11 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理 typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理
typeof(SingleMigrationsEntityFrameworkCoreModule), typeof(SingleMigrationsEntityFrameworkCoreModule),
#if POSTGRESQL
typeof(AbpEntityFrameworkCorePostgreSqlModule),
#else
typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpEntityFrameworkCoreMySQLModule),
#endif
typeof(AbpAliyunSmsModule), typeof(AbpAliyunSmsModule),
typeof(AbpAliyunSettingManagementModule), typeof(AbpAliyunSettingManagementModule),
@ -312,7 +321,11 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpElsaServerModule), typeof(AbpElsaServerModule),
typeof(AbpElsaActivitiesModule), typeof(AbpElsaActivitiesModule),
typeof(AbpElsaEntityFrameworkCoreModule), typeof(AbpElsaEntityFrameworkCoreModule),
#if POSTGRESQL
typeof(AbpElsaEntityFrameworkCorePostgreSqlModule),
#else
typeof(AbpElsaEntityFrameworkCoreMySqlModule), typeof(AbpElsaEntityFrameworkCoreMySqlModule),
#endif
typeof(AbpExporterMiniExcelModule), typeof(AbpExporterMiniExcelModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule),

262
aspnet-core/services/LY.MicroService.Applications.Single/appsettings.PostgreSql.json

@ -0,0 +1,262 @@
{
"App": {
"ShowPii": true,
"SelfUrl": "http://127.0.0.1:30001/",
"CorsOrigins": "http://127.0.0.1:3100,http://127.0.0.1:30001",
"Urls": {
"Applications": {
"MVC": {
"RootUrl": "http://127.0.0.1:30001/",
"Urls": {
"Abp.Account.EmailConfirm": "Account/EmailConfirm",
"Abp.Account.EmailVerifyLogin": "Account/VerifyCode"
}
},
"STS": {
"RootUrl": "http://127.0.0.1:30001/"
},
"VueVbenAdmin": {
"RootUrl": "http://127.0.0.1:3100",
"Urls": {
"Abp.Account.EmailConfirm": "account/email-confirm"
}
}
}
}
},
"Auditing": {
"AllEntitiesSelector": true
},
"DistributedCache": {
"HideErrors": true,
"KeyPrefix": "LINGYUN.Abp.Application",
"GlobalCacheEntryOptions": {
"SlidingExpiration": "30:00:00",
"AbsoluteExpirationRelativeToNow": "60:00:00"
}
},
"ConnectionStrings": {
"Default": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpAuditLogging": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpOpenIddict": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpIdentity": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpIdentityServer": "Host=127.0.0.1;Database=IdentityServer-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpSaas": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpTenantManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpFeatureManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpSettingManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpPermissionManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpLocalizationManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AbpTextTemplating": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"AppPlatform": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"TaskManagement": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Workflow": "Host=127.0.0.1;Database=Workflow-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Notifications": "Host=127.0.0.1;Database=Messages-V70;Username=postgres;Password=123456;SslMode=Prefer",
"MessageService": "Host=127.0.0.1;Database=Messages-V70;Username=postgres;Password=123456;SslMode=Prefer",
"Demo": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=14"
}
},
"Elsa": {
"Features": {
"DefaultPersistence": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"PostgreSql": {
"Enabled": true
}
}
},
"Console": true,
"Http": true,
"Email": true,
"TemporalQuartz": true,
"JavaScriptActivities": true,
"UserTask": true,
"Conductor": true,
"Telnyx": true,
"BlobStoring": true,
"Emailing": true,
"Notification": true,
"Sms": true,
"IM": true,
"PublishWebhook": true,
"Webhooks": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"PostgreSql": {
"Enabled": true
}
}
},
"WorkflowSettings": {
"Enabled": true,
"ConnectionStringIdentifier": "Workflow",
"EntityFrameworkCore": {
"PostgreSql": {
"Enabled": true
}
}
}
},
"Server": {
"BaseUrl": "http://127.0.0.1:30000"
}
},
"Quartz": {
"UsePersistentStore": true,
"Properties": {
"quartz.jobStore.dataSource": "tkm",
"quartz.jobStore.type": "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz",
"quartz.jobStore.driverDelegateType": "Quartz.Impl.AdoJobStore.PostgreSQLDelegate, Quartz",
"quartz.dataSource.tkm.connectionString": "Host=127.0.0.1;Database=Platform-V70;Username=postgres;Password=123456;SslMode=Prefer",
"quartz.dataSource.tkm.provider": "Npgsql",
"quartz.jobStore.clustered": "true",
"quartz.serializer.type": "json",
"quartz.dataSource.tkm.connectionStringName": "TaskManagement"
}
},
"Redis": {
"IsEnabled": true,
"Configuration": "127.0.0.1,defaultDatabase=15",
"InstanceName": "LINGYUN.Abp.Application"
},
"Features": {
"Validation": {
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=13",
"InstanceName": "LINGYUN.Abp.Application"
}
}
},
"AuthServer": {
"UseOpenIddict": true,
"Authority": "http://127.0.0.1:30001/",
"Audience": "lingyun-abp-application",
"RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
},
"IdentityServer": {
"Clients": {
"VueAdmin": {
"ClientId": "vue-admin-client",
"RootUrl": "http://127.0.0.1:3100/"
},
"InternalService": {
"ClientId": "InternalServiceClient"
}
}
},
"OpenIddict": {
"Applications": {
"VueAdmin": {
"ClientId": "vue-admin-client",
"RootUrl": "http://127.0.0.1:3100/"
},
"InternalService": {
"ClientId": "InternalServiceClient"
}
},
"Lifetime": {
"AuthorizationCode": "00:05:00",
"AccessToken": "14:00:00",
"DeviceCode": "00:10:00",
"IdentityToken": "00:20:00",
"RefreshToken": "14:00:00",
"RefreshTokenReuseLeeway": "00:00:30",
"UserCode": "00:10:00"
}
},
"Identity": {
"Password": {
"RequiredLength": 6,
"RequiredUniqueChars": 0,
"RequireNonAlphanumeric": false,
"RequireLowercase": false,
"RequireUppercase": false,
"RequireDigit": false
},
"Lockout": {
"AllowedForNewUsers": false,
"LockoutDuration": 5,
"MaxFailedAccessAttempts": 5
},
"SignIn": {
"RequireConfirmedEmail": false,
"RequireConfirmedPhoneNumber": false
}
},
"FeatureManagement": {
"IsDynamicStoreEnabled": true
},
"SettingManagement": {
"IsDynamicStoreEnabled": true
},
"PermissionManagement": {
"IsDynamicStoreEnabled": true
},
"TextTemplating": {
"IsDynamicStoreEnabled": true
},
"WebhooksManagement": {
"IsDynamicStoreEnabled": true
},
"Logging": {
"Serilog": {
"Elasticsearch": {
"IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}"
}
}
},
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "abp.dev.auditing"
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
},
"Minio": {
"WithSSL": false,
"BucketName": "blobs",
"EndPoint": "127.0.0.1:19000",
"AccessKey": "ZD43kNpimiJf9mCuomTP",
"SecretKey": "w8IqMgi4Tnz0DGzN8jZ7IJWq7OEdbUnAU0jlZxQK",
"CreateBucketIfNotExists": false
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"DotNetCore": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Debug",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"
}
}
]
}
}

6
common.props

@ -11,6 +11,7 @@
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl> <RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl>
<GeneratePackageOnBuild Condition="$(AssemblyName.StartsWith('LINGYUN'))">true</GeneratePackageOnBuild> <GeneratePackageOnBuild Condition="$(AssemblyName.StartsWith('LINGYUN'))">true</GeneratePackageOnBuild>
<Configurations>Debug;Release;PostgreSQL</Configurations>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -35,4 +36,9 @@
<OutputPath>$(SolutionDir)LocalNuget</OutputPath> <OutputPath>$(SolutionDir)LocalNuget</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PostgreSQL|AnyCPU'">
<DefineConstants>POSTGRESQL</DefineConstants>
<OutputPath>$(SolutionDir)LocalNuget</OutputPath>
</PropertyGroup>
</Project> </Project>
Loading…
Cancel
Save