From 2161ebf1e89ba6d32933a2f80f0db5bd8072b0df Mon Sep 17 00:00:00 2001 From: Elias Jansson Date: Sat, 24 Jan 2026 14:14:26 +0100 Subject: [PATCH] Flytta filen till persistant --- Aberwyn/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Aberwyn/Program.cs b/Aberwyn/Program.cs index aa6c799..d2e3238 100644 --- a/Aberwyn/Program.cs +++ b/Aberwyn/Program.cs @@ -11,7 +11,7 @@ using Aberwyn.Services; var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: false) + .AddJsonFile("appsettings.json", optional: true) .AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", optional: true) .AddEnvironmentVariables() .Build(); @@ -25,7 +25,8 @@ builder.Configuration.AddConfiguration(config); // Läser setup.json eller skapar en ny tom om den inte finns -var setupFilePath = Path.Combine("infrastructure", "setup.json"); +var dataRoot = Path.Combine(Directory.GetCurrentDirectory(), "data"); +var setupFilePath = Path.Combine(dataRoot, "infrastructure", "setup.json"); if (!File.Exists(setupFilePath)) {