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:
2026-06-06 07:42:18 +02:00
12 changed files with 837 additions and 42 deletions

View File

@@ -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);