diff --git a/README.md b/README.md
index 36be4c01b0..cc7de2d763 100644
--- a/README.md
+++ b/README.md
@@ -78,19 +78,19 @@ Note that this container is meant to be long running. Updates are handled intern
Note that automatic configuration reloading is currently not supported in the container. See #1143
-If using manual configuration, before starting your container make sure the aforementioned `appsettings.Production.json` is setup properly. See below
+If using manual configuration, before starting your container make sure the aforementioned `appsettings.Production.yml` is setup properly. See below
### Configuring
-The first time you run TGS4 you should be prompted with a configuration wizard which will guide you through setting up your appsettings.Production.json
+The first time you run TGS4 you should be prompted with a configuration wizard which will guide you through setting up your `appsettings.Production.yml`
-This wizard will, generally, run whenever the server is launched without detecting the config json. Follow the instructions below to perform this process manually.
+This wizard will, generally, run whenever the server is launched without detecting the config yml. Follow the instructions below to perform this process manually.
#### Configuration Methods
There are 3 primary supported ways to configure TGS:
-- Modify the `appsettings.Production.json` file (Recommended).
+- Modify the `appsettings.Production.yml` file (Recommended).
- Set environment variables in the form `Section__Subsection=value` or `Section__ArraySubsection__0=value` for arrays.
- Set command line arguments in the form `--Section:Subsection=value` or `--Section:ArraySubsection:0=value` for arrays.
@@ -98,7 +98,7 @@ The latter two are not recommended as they cannot be dynamically changed at runt
#### Manual Configuration
-Create an `appsettings.Production.json` file next to `appsettings.json`. This will override the default settings in appsettings.json with your production settings. There are a few keys meant to be changed by hosts. Modifying any config files while the server is running will trigger a safe restart (Keeps DreamDaemon instances running). Note these are all case-sensitive:
+Create an `appsettings.Production.yml` file next to `appsettings.json`. This will override the default settings in `appsettings.json` with your production settings. There are a few keys meant to be changed by hosts. Modifying any config files while the server is running will trigger a safe restart (Keeps DreamDaemon instances running). Note these are all case-sensitive:
- `General:ConfigVersion`: Suppresses warnings about out of date config versions. You should change this after updating TGS to one with a new config version. The current version can be found on the releases page for your server version (This field did not exist before v4.4.0).
@@ -250,7 +250,7 @@ var/global/client_count = 0
## Remote Access
-tgstation-server is an [ASP.Net Core](https://docs.microsoft.com/en-us/aspnet/core/) app based on the Kestrel web server. This section is meant to serve as a general use case overview, but the entire Kestrel configuration can be modified to your liking with the configuration JSON. See [the official documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel) for details.
+tgstation-server is an [ASP.Net Core](https://docs.microsoft.com/en-us/aspnet/core/) app based on the Kestrel web server. This section is meant to serve as a general use case overview, but the entire Kestrel configuration can be modified to your liking with the configuration YAML. See [the official documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel) for details.
Exposing the builtin Kestrel server to the internet directly over HTTP is highly not reccommended due to the lack of security. The recommended way to expose tgstation-server to the internet is to host it through a reverse proxy with HTTPS support. Here are some step by step examples to achieve this for major web servers.
diff --git a/build/Version.props b/build/Version.props
index 222901410b..e51d2af857 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -4,7 +4,7 @@
4.7.0
- 2.2.0
+ 2.3.08.1.19.1.15.2.10
diff --git a/src/Tgstation.Server.Host/ServerFactory.cs b/src/Tgstation.Server.Host/ServerFactory.cs
index 55bbd24e3a..72d601c73d 100644
--- a/src/Tgstation.Server.Host/ServerFactory.cs
+++ b/src/Tgstation.Server.Host/ServerFactory.cs
@@ -49,7 +49,11 @@ namespace Tgstation.Server.Host
var basePath = IOManager.ResolvePath();
IHostBuilder CreateDefaultBuilder() => Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args)
- .ConfigureAppConfiguration((context, configuration) => configuration.SetBasePath(basePath));
+ .ConfigureAppConfiguration((context, builder) => {
+ builder.AddJsonFile($"appsettings.{context.HostingEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
+ .AddYamlFile($"appsettings.{context.HostingEnvironment.EnvironmentName}.yml", optional: true, reloadOnChange: true); //Allow both appsettings.json and appsettings.yml for backwards compat
+
+ });
var setupWizardHostBuilder = CreateDefaultBuilder()
.UseSetupApplication();
diff --git a/src/Tgstation.Server.Host/Setup/SetupWizard.cs b/src/Tgstation.Server.Host/Setup/SetupWizard.cs
index 6a7c99e03b..927cb43982 100644
--- a/src/Tgstation.Server.Host/Setup/SetupWizard.cs
+++ b/src/Tgstation.Server.Host/Setup/SetupWizard.cs
@@ -22,6 +22,7 @@ using Tgstation.Server.Host.Core;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.IO;
using Tgstation.Server.Host.System;
+using YamlDotNet.Serialization;
namespace Tgstation.Server.Host.Setup
{
@@ -841,8 +842,11 @@ namespace Tgstation.Server.Host.Setup
{ SwarmConfiguration.Section, swarmConfiguration },
};
- var json = JsonConvert.SerializeObject(map, Formatting.Indented);
- var configBytes = Encoding.UTF8.GetBytes(json);
+ var serializer = new SerializerBuilder().Build();
+
+ var serializedYaml = serializer.Serialize(map);
+
+ var configBytes = Encoding.UTF8.GetBytes(serializedYaml);
reloadTcs = new TaskCompletionSource