Merge feature/ops-1: TrueNAS deployment (compose + backup sidecar + nginx proxy + prod Dockerfiles), Gitea CI draft, German ops guide [god-QA: 18/18+47/47+e2e 48/48]
This commit is contained in:
@@ -50,12 +50,9 @@ app.MapDefaultEndpoints();
|
||||
app.MapOpenApi();
|
||||
app.MapScalarApiReference();
|
||||
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
// Aspire provisions an empty database in dev — bring the schema up to date.
|
||||
using var scope = app.Services.CreateScope();
|
||||
// Apply EF migrations at startup (no-op if schema is current; safe for single-instance deploy).
|
||||
using (var scope = app.Services.CreateScope())
|
||||
scope.ServiceProvider.GetRequiredService<ApplicationContext>().Database.Migrate();
|
||||
}
|
||||
|
||||
app.UseCors(LanCorsPolicy);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user