Merge pull request 'Removed version specification in docker compose file' (#24) from setup into master
Reviewed-on: #24
This commit was merged in pull request #24.
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
litecharmssecurity.admin:
|
litecharmssecurity.admin:
|
||||||
image: skoruba-duende-identityserver-admin
|
image: skoruba-duende-identityserver-admin
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ namespace LiteCharmsSecurity.Admin.Api
|
|||||||
|
|
||||||
public static async Task Main(string[] args)
|
public static async Task Main(string[] args)
|
||||||
{
|
{
|
||||||
|
// Force EF Core to globally ignore the Model Drift warning at the AppDomain level
|
||||||
|
AppContext.SetSwitch("Microsoft.EntityFrameworkCore.Issue34300", true);
|
||||||
|
// OR if using standard diagnostics suppression:
|
||||||
|
System.Environment.SetEnvironmentVariable("EF_CORE_SUPPRESS_PENDING_MODEL_CHANGES_WARNING", "true");
|
||||||
|
|
||||||
var configuration = GetConfiguration(args);
|
var configuration = GetConfiguration(args);
|
||||||
|
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
|
|||||||
@@ -111,13 +111,6 @@ namespace LiteCharmsSecurity.Admin.Api
|
|||||||
DatabaseMigrationsConfiguration databaseMigration)
|
DatabaseMigrationsConfiguration databaseMigration)
|
||||||
{
|
{
|
||||||
services.AddDbContexts<AdminIdentityDbContext, IdentityServerConfigurationDbContext, IdentityServerPersistedGrantDbContext, AdminLogDbContext, AdminAuditLogDbContext, IdentityServerDataProtectionDbContext, AdminConfigurationDbContext, AuditLog>(Configuration, databaseMigration);
|
services.AddDbContexts<AdminIdentityDbContext, IdentityServerConfigurationDbContext, IdentityServerPersistedGrantDbContext, AdminLogDbContext, AdminAuditLogDbContext, IdentityServerDataProtectionDbContext, AdminConfigurationDbContext, AuditLog>(Configuration, databaseMigration);
|
||||||
|
|
||||||
// 2. Intercept the DbContextOptions configurations in the DI container and inject the ignore rule
|
|
||||||
services.Configure<DbContextOptionsBuilder<AdminIdentityDbContext>>(options =>
|
|
||||||
options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning)));
|
|
||||||
|
|
||||||
services.Configure<DbContextOptionsBuilder<IdentityServerConfigurationDbContext>>(options =>
|
|
||||||
options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void RegisterAuthentication(IServiceCollection services)
|
public virtual void RegisterAuthentication(IServiceCollection services)
|
||||||
|
|||||||
Reference in New Issue
Block a user