chore(secrets): load API key, connection strings, and AuthBlocks via CredentialTools across all three hosts; strip secret placeholders from appsettings.json

This commit is contained in:
Daniel Harvey
2026-05-18 17:35:29 -04:00
parent 12c4046965
commit fc9bc3d607
5 changed files with 27 additions and 15 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ using DeepDrftContent.Services.FileDatabase.Services;
using DeepDrftContent.Services.Processors;
using DeepDrftContent.Models;
using Microsoft.Extensions.Logging;
using NetBlocks.Utilities.Environment;
namespace DeepDrftContent
{
@@ -19,7 +20,8 @@ namespace DeepDrftContent
builder.Services.AddSingleton<TrackService>();
// File Database
builder.Configuration.AddJsonFile("environment/filedatabase.json", optional: false, reloadOnChange: true);
var fileDatabasePath = CredentialTools.ResolvePathOrThrow("filedatabase", "environment/filedatabase.json");
builder.Configuration.AddJsonFile(fileDatabasePath, optional: false, reloadOnChange: false);
var fileDatabaseSettings = builder.Configuration.GetSection(nameof(FileDatabaseSettings)).Get<FileDatabaseSettings>();
if (fileDatabaseSettings is null) { throw new Exception("File database settings are not configured"); }