fix: Production 로그 누락 및 DB 마이그레이션 미적용 수정 (#277)

- appsettings.json Serilog WriteTo에 Console 싱크 추가 (docker logs 출력)
- Program.cs 스타트업 시 db.Database.MigrateAsync() 자동 적용

Closes #277
This commit is contained in:
SEAN 2026-03-18 09:15:26 +09:00
parent b2485569be
commit 2adb34acab
2 changed files with 9 additions and 1 deletions

View File

@ -73,7 +73,14 @@ builder.Services.AddRateLimiter(options =>
var app = builder.Build(); var app = builder.Build();
// ===== 5. Middleware Pipeline ===== // ===== 5. DB 마이그레이션 자동 적용 =====
using (var scope = app.Services.CreateScope())
{
var db = scope.ServiceProvider.GetRequiredService<SPMS.Infrastructure.AppDbContext>();
await db.Database.MigrateAsync();
}
// ===== 6. Middleware Pipeline =====
app.UseMiddlewarePipeline(); app.UseMiddlewarePipeline();
app.Run(); app.Run();

View File

@ -45,6 +45,7 @@
} }
}, },
"WriteTo": [ "WriteTo": [
{ "Name": "Console" },
{ {
"Name": "File", "Name": "File",
"Args": { "Args": {