From b67843d5ffa93121d0e47b7189e8377ef6400960 Mon Sep 17 00:00:00 2001 From: rfi Date: Thu, 23 May 2024 19:22:25 +0700 Subject: [PATCH] docker non readable volume, TODO: fix later --- SCHALE.GameServer/Utils/Config.cs | 5 ++++- compose.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/SCHALE.GameServer/Utils/Config.cs b/SCHALE.GameServer/Utils/Config.cs index 0f7fa2b..65757fe 100644 --- a/SCHALE.GameServer/Utils/Config.cs +++ b/SCHALE.GameServer/Utils/Config.cs @@ -15,16 +15,19 @@ namespace SCHALE.GameServer.Utils if (!File.Exists(ConfigPath)) Save(); +#if !DOCKER_BUILD string json = File.ReadAllText(ConfigPath); - Instance = JsonSerializer.Deserialize(json); +#endif Log.Debug($"Config loaded"); } public static void Save() { +#if !DOCKER_BUILD File.WriteAllText(ConfigPath, JsonSerializer.Serialize(Instance)); +#endif Log.Debug($"Config saved"); } diff --git a/compose.yaml b/compose.yaml index a7720ae..35a9bac 100644 --- a/compose.yaml +++ b/compose.yaml @@ -18,6 +18,7 @@ services: target: final ports: - 80:80 + - 6667:6667 db: image: mcr.microsoft.com/mssql/server