accidentally comitted my volume configs, fixed bug related to missing userconfig file.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-07 07:28:52 -07:00
parent 4e92155f5b
commit f639c2c38b
2 changed files with 5 additions and 5 deletions

View File

@@ -55,6 +55,11 @@ namespace CarCareTracker.Controllers
{
try
{
if (!System.IO.File.Exists("config/userConfig.json"))
{
//if file doesn't exist it might be because it's running on a mounted volume in docker.
System.IO.File.WriteAllText("config/userConfig.json", System.Text.Json.JsonSerializer.Serialize(new UserConfig()));
}
var configFileContents = System.IO.File.ReadAllText("config/userConfig.json");
var existingUserConfig = System.Text.Json.JsonSerializer.Deserialize<UserConfig>(configFileContents);
if (existingUserConfig is not null)

View File

@@ -21,12 +21,7 @@ services:
volumes:
config:
external: true
data:
external: true
documents:
external: true
images:
external: true
log:
external: true