accidentally comitted my volume configs, fixed bug related to missing userconfig file.
This commit is contained in:
@@ -55,6 +55,11 @@ namespace CarCareTracker.Controllers
|
|||||||
{
|
{
|
||||||
try
|
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 configFileContents = System.IO.File.ReadAllText("config/userConfig.json");
|
||||||
var existingUserConfig = System.Text.Json.JsonSerializer.Deserialize<UserConfig>(configFileContents);
|
var existingUserConfig = System.Text.Json.JsonSerializer.Deserialize<UserConfig>(configFileContents);
|
||||||
if (existingUserConfig is not null)
|
if (existingUserConfig is not null)
|
||||||
|
|||||||
@@ -21,12 +21,7 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
config:
|
config:
|
||||||
external: true
|
|
||||||
data:
|
data:
|
||||||
external: true
|
|
||||||
documents:
|
documents:
|
||||||
external: true
|
|
||||||
images:
|
images:
|
||||||
external: true
|
|
||||||
log:
|
log:
|
||||||
external: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user