Add trap logging, dashboard, EF migrations and Dockerfile

This commit is contained in:
Tom committed 2026-11-14 13:31:59 +01:00
1 parent f9161f48e7
commit b561924efa
26 files changed
+784 -62

No files matched your search

@@ -12,6 +12,14 @@ public static class FlypaperStorageExtensions
services.AddSingleton<ChannelTrapEventSink>();
services.AddSingleton<ITrapEventSink>(sp => sp.GetRequiredService<ChannelTrapEventSink>());
services.AddHostedService<TrapEventWriter>();
services.AddSingleton<DashboardQueries>();
return services;
}
public static async Task MigrateFlypaperDatabaseAsync(this IServiceProvider services, CancellationToken ct = default)
{
var factory = services.GetRequiredService<IDbContextFactory<FlypaperDbContext>>();
await using var db = await factory.CreateDbContextAsync(ct);
await db.Database.MigrateAsync(ct);
}
}