From 6802a01b328a43db8a7e486c613c66de17566189 Mon Sep 17 00:00:00 2001 From: Justin Baur <19896123+justindbaur@users.noreply.github.com> Date: Fri, 25 Oct 2024 09:26:31 -0400 Subject: [PATCH] Add Config Option For Disabling Built In MSSQL Container --- util/Setup/Configuration.cs | 3 +++ util/Setup/DockerComposeBuilder.cs | 2 ++ util/Setup/Templates/DockerCompose.hbs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/util/Setup/Configuration.cs b/util/Setup/Configuration.cs index 264eef05b..192823c00 100644 --- a/util/Setup/Configuration.cs +++ b/util/Setup/Configuration.cs @@ -97,6 +97,9 @@ public class Configuration [Description("Enable SCIM")] public bool EnableScim { get; set; } = false; + [Description("Disable Built-In MSSQL Container Generation")] + public bool DisableBuiltInMsSql { get; set; } + [YamlIgnore] public string Domain { diff --git a/util/Setup/DockerComposeBuilder.cs b/util/Setup/DockerComposeBuilder.cs index b5976e90c..1787b9994 100644 --- a/util/Setup/DockerComposeBuilder.cs +++ b/util/Setup/DockerComposeBuilder.cs @@ -42,6 +42,7 @@ public class DockerComposeBuilder { public TemplateModel(Context context) { + DisableBuiltInMsSql = context.Config.DisableBuiltInMsSql; MssqlDataDockerVolume = context.Config.DatabaseDockerVolume; EnableKeyConnector = context.Config.EnableKeyConnector; EnableScim = context.Config.EnableScim; @@ -61,6 +62,7 @@ public class DockerComposeBuilder } } + public bool DisableBuiltInMsSql { get; set; } public bool MssqlDataDockerVolume { get; set; } public bool EnableKeyConnector { get; set; } public bool EnableScim { get; set; } diff --git a/util/Setup/Templates/DockerCompose.hbs b/util/Setup/Templates/DockerCompose.hbs index d9ad6c461..628ca477f 100644 --- a/util/Setup/Templates/DockerCompose.hbs +++ b/util/Setup/Templates/DockerCompose.hbs @@ -14,6 +14,7 @@ ######################################################################### services: +{{#if DisableBuiltInMsSql}} mssql: image: bitwarden/mssql:{{{CoreVersion}}} container_name: bitwarden-mssql @@ -31,6 +32,7 @@ services: - mssql.env - ../env/uid.env - ../env/mssql.override.env +{{/if}} web: image: bitwarden/web:{{{WebVersion}}}