diff options
Diffstat (limited to 'src/marlin.web/Program.cs')
| -rw-r--r-- | src/marlin.web/Program.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/marlin.web/Program.cs b/src/marlin.web/Program.cs index cf330b2..f079a3c 100644 --- a/src/marlin.web/Program.cs +++ b/src/marlin.web/Program.cs @@ -1,4 +1,5 @@ using marlin.web.Data; +using marlin.web.Models; using marlin.web.Services; using Microsoft.EntityFrameworkCore; @@ -10,8 +11,13 @@ builder.Services.AddDbContext<ApplicationDbContext>(options => options .UseNpgsql(builder.Configuration.GetConnectionString("Master")) .UseSnakeCaseNamingConvention()); +builder.Services.AddScoped<ISourceSecretStore, DatabaseSourceSecretStore>(); + builder.Services.AddHostedService<DatabaseUpgrader>(); -builder.Services.AddHostedService<VersionControlSyncService>(); + +builder.Services.AddSingleton<VersionControlSyncService>(); +builder.Services.AddHostedService<VersionControlSyncService>(sp => sp + .GetRequiredService<VersionControlSyncService>()); // Add services to the container. builder.Services.AddControllersWithViews(); |
