Add Rider launch profiles, fix DI and migrations for dev startup
- Rider launch profiles: "ScadaLink Central" and "ScadaLink Site" - appsettings.Central.json: correct test_infra credentials (ScadaLink_Dev1#, scadalink_app user, GLAuth on 3893, Mailpit on 1025) - Fix HealthMonitoring DI: split site vs central registration to avoid missing IHealthReportTransport on central - Regenerate single clean EF migration (InitialSchema) covering all entities - Suppress PendingModelChangesWarning in dev mode - Fix isDevelopment check for ASPNETCORE_ENVIRONMENT propagation Verified: Host starts, connects to SQL Server, applies migrations, boots Akka.NET cluster, LDAP auth works (admin/password via GLAuth), health endpoint returns Healthy.
This commit is contained in:
@@ -5,12 +5,23 @@ namespace ScadaLink.HealthMonitoring;
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Register site-side health monitoring services.
|
||||
/// Register site-side health monitoring services (metric collection + periodic reporting).
|
||||
/// Call this on site nodes only. For central, call AddCentralHealthAggregation() instead.
|
||||
/// </summary>
|
||||
public static IServiceCollection AddSiteHealthMonitoring(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<ISiteHealthCollector, SiteHealthCollector>();
|
||||
services.AddHostedService<HealthReportSender>();
|
||||
return services;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register shared health monitoring services (safe for both central and site).
|
||||
/// Does not start the HealthReportSender — call AddSiteHealthMonitoring() on site nodes for that.
|
||||
/// </summary>
|
||||
public static IServiceCollection AddHealthMonitoring(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<ISiteHealthCollector, SiteHealthCollector>();
|
||||
services.AddHostedService<HealthReportSender>();
|
||||
return services;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user