Add deployment
CI / frontend (push) Failing after 57s
CI / backend (push) Failing after 6m27s

This commit is contained in:
voltsrage
2026-08-05 00:26:20 +08:00
parent 9e88ff6113
commit 2a3ef62a7d
86 changed files with 2320 additions and 174 deletions
+8 -6
View File
@@ -120,13 +120,15 @@ try
ResponseWriter = HealthCheckResponseWriter.WriteAsync
});
if (!app.Environment.IsEnvironment("Testing"))
// Startup migration is the proven path for this single-instance edge host.
// Gate with Gateway:AutoMigrate so production can switch to an out-of-band
// EF migration bundle later without a code change (Phase 36 Step 6).
if (!app.Environment.IsEnvironment("Testing")
&& builder.Configuration.GetValue("Gateway:AutoMigrate", true))
{
using (var scope = app.Services.CreateScope())
{
var db = scope.ServiceProvider.GetRequiredService<GatewayDbContext>();
await db.Database.MigrateAsync();
}
using var scope = app.Services.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<GatewayDbContext>();
await db.Database.MigrateAsync();
}
app.Run();