Merge remote-tracking branch 'refs/remotes/origin/master'

This commit is contained in:
game4353 2024-05-26 20:36:46 +08:00
commit 1da6abb46f
2 changed files with 5 additions and 1 deletions

View File

@ -15,16 +15,19 @@ namespace SCHALE.GameServer.Utils
if (!File.Exists(ConfigPath)) if (!File.Exists(ConfigPath))
Save(); Save();
#if !DOCKER_BUILD
string json = File.ReadAllText(ConfigPath); string json = File.ReadAllText(ConfigPath);
Instance = JsonSerializer.Deserialize<Config>(json); Instance = JsonSerializer.Deserialize<Config>(json);
#endif
Log.Debug($"Config loaded"); Log.Debug($"Config loaded");
} }
public static void Save() public static void Save()
{ {
#if !DOCKER_BUILD
File.WriteAllText(ConfigPath, JsonSerializer.Serialize(Instance)); File.WriteAllText(ConfigPath, JsonSerializer.Serialize(Instance));
#endif
Log.Debug($"Config saved"); Log.Debug($"Config saved");
} }

View File

@ -18,6 +18,7 @@ services:
target: final target: final
ports: ports:
- 80:80 - 80:80
- 6667:6667
db: db:
image: mcr.microsoft.com/mssql/server image: mcr.microsoft.com/mssql/server