diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/ChannelStatusController.cs b/extra/admin-api/Spacebar.Offload/Controllers/ChannelStatusController.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Controllers/ChannelStatusController.cs
rename to extra/admin-api/Spacebar.Offload/Controllers/ChannelStatusController.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs b/extra/admin-api/Spacebar.Offload/Controllers/IdentifyController.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Controllers/IdentifyController.cs
rename to extra/admin-api/Spacebar.Offload/Controllers/IdentifyController.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/Op12Controller.cs b/extra/admin-api/Spacebar.Offload/Controllers/Op12Controller.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Controllers/Op12Controller.cs
rename to extra/admin-api/Spacebar.Offload/Controllers/Op12Controller.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/Op14Controller.cs b/extra/admin-api/Spacebar.Offload/Controllers/Op14Controller.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Controllers/Op14Controller.cs
rename to extra/admin-api/Spacebar.Offload/Controllers/Op14Controller.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Controllers/Op8Controller.cs b/extra/admin-api/Spacebar.Offload/Controllers/Op8Controller.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Controllers/Op8Controller.cs
rename to extra/admin-api/Spacebar.Offload/Controllers/Op8Controller.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Extensions/Db/UserExtensions.cs b/extra/admin-api/Spacebar.Offload/Extensions/Db/UserExtensions.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Extensions/Db/UserExtensions.cs
rename to extra/admin-api/Spacebar.Offload/Extensions/Db/UserExtensions.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Program.cs b/extra/admin-api/Spacebar.Offload/Program.cs
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Program.cs
rename to extra/admin-api/Spacebar.Offload/Program.cs
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Properties/launchSettings.json b/extra/admin-api/Spacebar.Offload/Properties/launchSettings.json
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Properties/launchSettings.json
rename to extra/admin-api/Spacebar.Offload/Properties/launchSettings.json
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Spacebar.GatewayOffload.csproj b/extra/admin-api/Spacebar.Offload/Spacebar.Offload.csproj
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Spacebar.GatewayOffload.csproj
rename to extra/admin-api/Spacebar.Offload/Spacebar.Offload.csproj
diff --git a/extra/admin-api/Spacebar.GatewayOffload/Spacebar.GatewayOffload.http b/extra/admin-api/Spacebar.Offload/Spacebar.Offload.http
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/Spacebar.GatewayOffload.http
rename to extra/admin-api/Spacebar.Offload/Spacebar.Offload.http
diff --git a/extra/admin-api/Spacebar.GatewayOffload/appsettings.Development.json b/extra/admin-api/Spacebar.Offload/appsettings.Development.json
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/appsettings.Development.json
rename to extra/admin-api/Spacebar.Offload/appsettings.Development.json
diff --git a/extra/admin-api/Spacebar.GatewayOffload/appsettings.json b/extra/admin-api/Spacebar.Offload/appsettings.json
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/appsettings.json
rename to extra/admin-api/Spacebar.Offload/appsettings.json
diff --git a/extra/admin-api/Spacebar.GatewayOffload/deps.json b/extra/admin-api/Spacebar.Offload/deps.json
similarity index 100%
rename from extra/admin-api/Spacebar.GatewayOffload/deps.json
rename to extra/admin-api/Spacebar.Offload/deps.json
diff --git a/extra/admin-api/Spacebar.Offload/http-client.private.env.json b/extra/admin-api/Spacebar.Offload/http-client.private.env.json
new file mode 100644
index 000000000..8e13c5990
--- /dev/null
+++ b/extra/admin-api/Spacebar.Offload/http-client.private.env.json
@@ -0,0 +1,5 @@
+{
+ "dev": {
+ "AccessToken": "eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwMDY1OTgyMzAxNTYzNDEyNzYiLCJpYXQiOjE3NjU4NjYxNDcsImtpZCI6IjVkZTcwNjZlNWQ5YTkxZDc4NGQ2NTY1Njc2Zjc0ZGY4NGQyMDllNzBjY2M3ZmZmNmFhNjgxNTkwODEwMWRjMWEiLCJ2ZXIiOjMsImRpZCI6IklCWkFSR01YT0UifQ.ALoB-4LXPaHTiUWRSoO3KIIc7CX2tP2vdebxmt10h3DqqBW57Zqx9zNImGxn0tV4cqFB1nZct3cZjJ_XVchtUF61AEgGR54QpV2sHAss2NMqZA_S3WK7UigFJYDddWUt2D_GrvzUYUVJ_WB4gt-tXekKzB2K6dazTEFYPFSY6xINBWed"
+ }
+}
\ No newline at end of file
diff --git a/extra/admin-api/Spacebar.UApi/Program.cs b/extra/admin-api/Spacebar.UApi/Program.cs
index afdb42ae8..3ebc2db5d 100644
--- a/extra/admin-api/Spacebar.UApi/Program.cs
+++ b/extra/admin-api/Spacebar.UApi/Program.cs
@@ -8,7 +8,6 @@ using Spacebar.ConfigModel.Extensions;
using Spacebar.Interop.Authentication;
using Spacebar.Interop.Authentication.AspNetCore;
using Spacebar.Models.Db.Contexts;
-using Spacebar.Models.Generic.Constants;
using Spacebar.UApi.Services;
var builder = WebApplication.CreateBuilder(args);
@@ -114,7 +113,6 @@ app.Map("/", async context => {
foreach (var header in responseMessage.Headers) context.Response.Headers[header.Key] = header.Value.ToArray();
foreach (var header in responseMessage.Content.Headers) context.Response.Headers[header.Key] = header.Value.ToArray();
- context.Response.Headers["X-SB-UApi-Status"] = "MISSING";
// await responseMessage.Content.CopyToAsync(context.Response.Body);
var txt = await responseMessage.Content.ReadAsStringAsync();
diff --git a/extra/admin-api/SpacebarAdminAPI.slnx b/extra/admin-api/SpacebarAdminAPI.slnx
index 34ed54028..0578bc353 100644
--- a/extra/admin-api/SpacebarAdminAPI.slnx
+++ b/extra/admin-api/SpacebarAdminAPI.slnx
@@ -36,6 +36,6 @@
-
+
diff --git a/extra/admin-api/outputs.nix b/extra/admin-api/outputs.nix
index 6f47df05d..87f8e83e3 100644
--- a/extra/admin-api/outputs.nix
+++ b/extra/admin-api/outputs.nix
@@ -203,11 +203,11 @@ flake-utils.lib.eachSystem flake-utils.lib.allSystems (
proj.Spacebar-Interop-Cdn-Abstractions
];
};
- Spacebar-GatewayOffload = makeNupkg {
- name = "Spacebar.GatewayOffload";
- nugetDeps = Spacebar.GatewayOffload/deps.json;
- projectFile = "Spacebar.GatewayOffload.csproj";
- srcRoot = ./Spacebar.GatewayOffload;
+ Spacebar-Offload = makeNupkg {
+ name = "Spacebar.Offload";
+ nugetDeps = Spacebar.Offload/deps.json;
+ projectFile = "Spacebar.Offload.csproj";
+ srcRoot = ./Spacebar.Offload;
packNupkg = false;
projectReferences = [
proj.Spacebar-DataMappings-Generic
@@ -258,30 +258,30 @@ flake-utils.lib.eachSystem flake-utils.lib.allSystems (
Expose = [ "5000" ];
};
};
- containers.docker.gateway-offload = pkgs.dockerTools.buildLayeredImage {
- name = "spacebar-server-ts-gateway-offload";
- tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-AdminApi.version;
+ containers.docker.offload = pkgs.dockerTools.buildLayeredImage {
+ name = "spacebar-server-ts-offload";
+ tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-Offload.version;
contents = [ self.packages.${system}.Spacebar-AdminApi ];
config = {
- Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-GatewayOffload}" ];
+ Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-Offload}" ];
Expose = [ "5000" ];
};
};
containers.docker.cdn-cs = pkgs.dockerTools.buildLayeredImage {
name = "spacebar-server-ts-cdn-cs";
- tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-AdminApi.version;
+ tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-Cdn.version;
contents = [ self.packages.${system}.Spacebar-AdminApi ];
config = {
- Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-AdminApi}" ];
+ Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-Cdn}" ];
Expose = [ "5000" ];
};
};
containers.docker.uapi = pkgs.dockerTools.buildLayeredImage {
name = "spacebar-server-ts-cdn-cs";
- tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-AdminApi.version;
+ tag = builtins.replaceStrings [ "+" ] [ "_" ] self.packages.${system}.Spacebar-UApi.version;
contents = [ self.packages.${system}.Spacebar-AdminApi ];
config = {
- Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-AdminApi}" ];
+ Cmd = [ "${lib.getExe self.outputs.packages.${system}.Spacebar-UApi}" ];
Expose = [ "5000" ];
};
};
@@ -295,7 +295,7 @@ flake-utils.lib.eachSystem flake-utils.lib.allSystems (
in
pkgs.lib.recursiveUpdate (pkgs.lib.attrsets.unionOfDisjoint { } self.packages) {
x86_64-linux = {
- # spacebar-server-tests = self.packages.x86_64-linux.default.passthru.tests;
+ # spacebar-server-tests = self.packages.x86_64-linux.default.passthru.tests;
docker-admin-api = self.containers.x86_64-linux.docker.admin-api;
docker-gateway-offload = self.containers.x86_64-linux.docker.gateway-offload;
docker-cdn-cs = self.containers.x86_64-linux.docker.cdn-cs;
diff --git a/nix/modules/default/cs/gateway-offload-cs.nix b/nix/modules/default/cs/gateway-offload-cs.nix
deleted file mode 100644
index 6187f0757..000000000
--- a/nix/modules/default/cs/gateway-offload-cs.nix
+++ /dev/null
@@ -1,89 +0,0 @@
-self:
-{
- config,
- lib,
- pkgs,
- spacebar,
- ...
-}:
-
-let
- secrets = import ../secrets.nix { inherit lib config; };
- cfg = config.services.spacebarchat-server;
- jsonFormat = pkgs.formats.json { };
-in
-{
- imports = [ ];
- options.services.spacebarchat-server.gatewayOffload = lib.mkOption {
- default = { };
- description = "Configuration for C# gateway offload daemon.";
- type = lib.types.submodule {
- options = {
- enable = lib.mkEnableOption "Enable gateway offload daemon (C#).";
- listenPort = lib.mkOption {
- type = lib.types.port;
- default = 3011;
- description = "Port for the gateway offload daemon to listen on.";
- };
- extraConfiguration = lib.mkOption {
- type = jsonFormat.type;
- default = import ./default-appsettings-json.nix;
- description = "Extra appsettings.json configuration for the gateway offload daemon.";
- };
- enableIdentify = lib.mkEnableOption "Enable offloading gateway opcode 2 (IDENTIFY).";
- enableGuildMembers = lib.mkEnableOption "Enable offloading gateway opcode 8 (REQUEST_GUILD_MEMBERS).";
- enableGuildSync = lib.mkEnableOption "Enable offloading gateway opcode 12 (GUILD_SYNC).";
- enableLazyRequest = lib.mkEnableOption "Enable offloading gateway opcode 14 (LAZY_REQUEST).";
- enableChannelStatuses = lib.mkEnableOption "Enable offloading gateway opcode 36 (CHANNEL_STATUSES).";
- enableChannelInfo = lib.mkEnableOption "Enable offloading gateway opcode 43 (CHANNEL_INFO).";
- };
- };
- };
-
- config = lib.mkIf cfg.gatewayOffload.enable (
- let
- makeServerTsService = import ../makeServerTsService.nix { inherit cfg lib secrets; };
- in
- {
- assertions = [
- (import ./assert-has-connection-string.nix "Gateway Offload" cfg.gatewayOffload.extraConfiguration)
- ];
-
- services.spacebarchat-server.settings.offload = {
- gateway = {
- identifyUrl = lib.mkIf cfg.gatewayOffload.enableIdentify "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/Identify";
- guildMembersUrl = lib.mkIf cfg.gatewayOffload.enableGuildMembers "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/GuildMembers";
- guildSyncUrlUrl = lib.mkIf cfg.gatewayOffload.enableGuildSync "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/GuildSync";
- lazyRequestUrl = lib.mkIf cfg.gatewayOffload.enableLazyRequest "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/LazyRequest";
- channelStatusesUrl = lib.mkIf cfg.gatewayOffload.enableChannelStatuses "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/ChannelStatuses";
- channelInfoUrl = lib.mkIf cfg.gatewayOffload.enableChannelInfo "http://127.0.0.1:${builtins.toString cfg.gatewayOffload.listenPort}/_spacebar/offload/gateway/ChannelInfo";
- };
- };
-
- systemd.services.spacebar-cs-gateway-offload = makeServerTsService {
- description = "Spacebar Server - C# Gateway offload";
- environment = builtins.mapAttrs (_: val: builtins.toString val) (
- {
- # things we set by default...
- EVENT_TRANSMISSION = "unix";
- EVENT_SOCKET_PATH = "/run/spacebar/";
- }
- // cfg.extraEnvironment
- // {
- # things we force...
- # CONFIG_PATH = configFile;
- CONFIG_READONLY = 1;
- ASPNETCORE_URLS = "http://0.0.0.0:${toString cfg.gatewayOffload.listenPort}";
- STORAGE_LOCATION = cfg.cdnPath;
- APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-gateway-offload.json" (
- lib.recursiveUpdate (import ./default-appsettings-json.nix) cfg.gatewayOffload.extraConfiguration
- );
- }
- );
- serviceConfig = {
- ExecStart = "${self.packages.${pkgs.stdenv.hostPlatform.system}.Spacebar-GatewayOffload}/bin/Spacebar.GatewayOffload";
- };
- };
- }
- );
-}
diff --git a/nix/modules/default/cs/offload-cs.nix b/nix/modules/default/cs/offload-cs.nix
new file mode 100644
index 000000000..9186edcb7
--- /dev/null
+++ b/nix/modules/default/cs/offload-cs.nix
@@ -0,0 +1,97 @@
+self:
+{
+ config,
+ lib,
+ pkgs,
+ spacebar,
+ ...
+}:
+
+let
+ secrets = import ../secrets.nix { inherit lib config; };
+ cfg = config.services.spacebarchat-server;
+ offloadCfg = cfg.offload;
+ jsonFormat = pkgs.formats.json { };
+in
+{
+ imports = [ ];
+ options.services.spacebarchat-server.offload = lib.mkOption {
+ default = { };
+ description = "Configuration for C# offload daemon.";
+ type = lib.types.submodule {
+ options = {
+ enable = lib.mkEnableOption "Enable offload daemon (C#).";
+ listenPort = lib.mkOption {
+ type = lib.types.port;
+ default = 3011;
+ description = "Port for the offload daemon to listen on.";
+ };
+ extraConfiguration = lib.mkOption {
+ type = jsonFormat.type;
+ default = import ./default-appsettings-json.nix;
+ description = "Extra appsettings.json configuration for the offload daemon.";
+ };
+ gateway = lib.mkOption {
+ description = "Gateway offloads";
+ type = lib.types.submodule {
+ options = {
+ enableIdentify = lib.mkEnableOption "Enable offloading gateway opcode 2 (IDENTIFY).";
+ enableGuildMembers = lib.mkEnableOption "Enable offloading gateway opcode 8 (REQUEST_GUILD_MEMBERS).";
+ enableGuildSync = lib.mkEnableOption "Enable offloading gateway opcode 12 (GUILD_SYNC).";
+ enableLazyRequest = lib.mkEnableOption "Enable offloading gateway opcode 14 (LAZY_REQUEST).";
+ enableChannelStatuses = lib.mkEnableOption "Enable offloading gateway opcode 36 (CHANNEL_STATUSES).";
+ enableChannelInfo = lib.mkEnableOption "Enable offloading gateway opcode 43 (CHANNEL_INFO).";
+ };
+ };
+ };
+ };
+ };
+ };
+
+ config = lib.mkIf offloadCfg.enable (
+ let
+ makeServerTsService = import ../makeServerTsService.nix { inherit cfg lib secrets; };
+ in
+ {
+ assertions = [
+ (import ./assert-has-connection-string.nix "Gateway Offload" offloadCfg.extraConfiguration)
+ ];
+
+ services.spacebarchat-server.settings.offload = {
+ gateway = {
+ identifyUrl = lib.mkIf offloadCfg.gateway.enableIdentify "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/Identify";
+ guildMembersUrl = lib.mkIf offloadCfg.gateway.enableGuildMembers "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/GuildMembers";
+ guildSyncUrlUrl = lib.mkIf offloadCfg.gateway.enableGuildSync "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/GuildSync";
+ lazyRequestUrl = lib.mkIf offloadCfg.gateway.enableLazyRequest "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/LazyRequest";
+ channelStatusesUrl = lib.mkIf offloadCfg.gateway.enableChannelStatuses "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/ChannelStatuses";
+ channelInfoUrl = lib.mkIf offloadCfg.gateway.enableChannelInfo "http://127.0.0.1:${builtins.toString offloadCfg.listenPort}/_spacebar/offload/gateway/ChannelInfo";
+ };
+ };
+
+ systemd.services.spacebar-cs-offload = makeServerTsService {
+ description = "Spacebar Server - C# offload";
+ environment = builtins.mapAttrs (_: val: builtins.toString val) (
+ {
+ # things we set by default...
+ EVENT_TRANSMISSION = "unix";
+ EVENT_SOCKET_PATH = "/run/spacebar/";
+ }
+ // cfg.extraEnvironment
+ // {
+ # things we force...
+ # CONFIG_PATH = configFile;
+ CONFIG_READONLY = 1;
+ ASPNETCORE_URLS = "http://0.0.0.0:${toString offloadCfg.listenPort}";
+ STORAGE_LOCATION = cfg.cdnPath;
+ APPSETTINGS_PATH = jsonFormat.generate "appsettings.spacebar-offload.json" (
+ lib.recursiveUpdate (import ./default-appsettings-json.nix) offloadCfg.extraConfiguration
+ );
+ }
+ );
+ serviceConfig = {
+ ExecStart = "${lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.Spacebar-Offload}";
+ };
+ };
+ }
+ );
+}
diff --git a/nix/modules/default/default.nix b/nix/modules/default/default.nix
index 001cdc748..fefb25ce0 100644
--- a/nix/modules/default/default.nix
+++ b/nix/modules/default/default.nix
@@ -20,7 +20,7 @@ in
(import ./gw-sharding.nix self)
(import ./pion-sfu.nix self)
(import ./cs/cdn-cs.nix self)
- (import ./cs/gateway-offload-cs.nix self)
+ (import ./cs/offload-cs.nix self)
(import ./cs/admin-api.nix self)
(import ./cs/uapi.nix self)
];
diff --git a/nix/testVm/configuration.nix b/nix/testVm/configuration.nix
index 10bee8ec1..f9df7426d 100644
--- a/nix/testVm/configuration.nix
+++ b/nix/testVm/configuration.nix
@@ -31,7 +31,7 @@ in
enable = true;
apiEndpoint = sbLib.mkEndpointRaw "api.sb.localhost" 3001 8080 false;
gatewayEndpoint = sbLib.mkEndpointRaw "gw.sb.localhost" 3002 8080 false;
- extraGatewayPorts = lib.range 3100 3116;
+ extraGatewayPorts = lib.range 3100 3103; # 4 gateways total
cdnEndpoint = sbLib.mkEndpointRaw "cdn.sb.localhost" 3003 8080 false;
adminApiEndpoint = sbLib.mkEndpointRaw "admin.sb.localhost" 3004 8080 false;
webrtcEndpoint = sbLib.mkEndpointRaw "voice.sb.localhost" 3005 8080 false;
@@ -45,16 +45,24 @@ in
cdnSignatureIncludeUserAgent = false;
cdnSignatureKey = "meow";
};
+ limits = {
+ absoluteRate = {
+ register.enabled = false;
+ sendMessage.enabled = false;
+ };
+ };
};
- gatewayOffload = {
+ offload = {
enable = true;
- enableIdentify = true;
- enableGuildMembers = true;
- enableGuildSync = true;
- enableLazyRequest = true;
- enableChannelStatuses = true;
- enableChannelInfo = true;
+ gateway = {
+ enableIdentify = true;
+ enableGuildMembers = true;
+ enableGuildSync = true;
+ enableLazyRequest = true;
+ enableChannelStatuses = true;
+ enableChannelInfo = true;
+ };
extraConfiguration.ConnectionStrings.Spacebar = csConnectionString;
};
@@ -62,7 +70,7 @@ in
enable = true;
extraConfiguration.ConnectionStrings.Spacebar = csConnectionString;
};
-
+
cdnCs = {
enable = false;
extraConfiguration.ConnectionStrings.Spacebar = csConnectionString;
@@ -80,7 +88,7 @@ in
extraEnvironment = {
DATABASE = "postgres://postgres:postgres@127.0.0.1/spacebar";
-# LOG_REQUESTS = "-200,204,304";
+ # LOG_REQUESTS = "-200,204,304";
LOG_REQUESTS = "-";
LOG_VALIDATION_ERRORS = true;
#DB_LOGGING=true;
@@ -93,6 +101,13 @@ in
in
lib.trace ("Testing with config: " + builtins.toJSON cfg) cfg;
services.nginx.enable = true;
+ services.nginx.recommendedOptimisation = true;
+ services.nginx.appendConfig = ''
+ worker_processes 6;
+ '';
+ services.nginx.eventsConfig = ''
+ worker_connections 512;
+ '';
users.users.root.initialPassword = "root";
services.getty.autologinUser = "root";
diff --git a/nix/tests/test-bundle-starts.nix b/nix/tests/test-bundle-starts.nix
index 3beedaae2..16134f91f 100644
--- a/nix/tests/test-bundle-starts.nix
+++ b/nix/tests/test-bundle-starts.nix
@@ -30,9 +30,11 @@ in
};
nginx.enable = true;
- gatewayOffload = {
+ offload = {
enable = true;
- enableGuildSync = true;
+ gateway = {
+ enableGuildSync = true;
+ };
extraConfiguration.ConnectionStrings.Spacebar = "Host=127.0.0.1; Username=Spacebar; Password=postgres; Database=spacebar; Port=5432; Include Error Detail=true; Maximum Pool Size=1000; Command Timeout=6000; Timeout=600;";
};
};