1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-16 01:51:21 +01:00

compose version config variable

This commit is contained in:
Kyle Spearrin 2018-08-30 23:32:18 -04:00
parent edac914ebd
commit 477d665104
4 changed files with 26 additions and 11 deletions

View File

@ -165,14 +165,18 @@ namespace Bit.Setup
"Template: https://github.com/bitwarden/core/blob/master/util/Setup/Templates/NginxConfig.hbs")]
public bool GenerateNginxConfig { get; set; } = true;
[Description("Docker compose file port mapping for HTTP. Leave empty for remove the port mapping.\n" +
[Description("Docker compose file port mapping for HTTP. Leave empty to remove the port mapping.\n" +
"Learn more: https://docs.docker.com/compose/compose-file/#ports")]
public string HttpPort { get; set; } = "80";
[Description("Docker compose file port mapping for HTTPS. Leave empty for remove the port mapping.\n" +
[Description("Docker compose file port mapping for HTTPS. Leave empty to remove the port mapping.\n" +
"Learn more: https://docs.docker.com/compose/compose-file/#ports")]
public string HttpsPort { get; set; } = "443";
[Description("Docker compose file version. Leave empty for default.\n" +
"Learn more: https://docs.docker.com/compose/compose-file/compose-versioning/")]
public string ComposeVersion { get; set; }
[Description("Configure Nginx for SSL.")]
public bool Ssl { get; set; } = true;

View File

@ -45,13 +45,24 @@ namespace Bit.Setup
{
public TemplateModel(Context context)
{
if(!string.IsNullOrWhiteSpace(context.Config.ComposeVersion))
{
ComposeVersion = context.Config.ComposeVersion;
}
MssqlDataDockerVolume = context.Config.DatabaseDockerVolume;
HttpPort = context.Config.HttpPort;
HttpsPort = context.Config.HttpsPort;
CoreVersion = context.CoreVersion;
WebVersion = context.WebVersion;
if(!string.IsNullOrWhiteSpace(context.CoreVersion))
{
CoreVersion = context.CoreVersion;
}
if(!string.IsNullOrWhiteSpace(context.WebVersion))
{
WebVersion = context.WebVersion;
}
}
public string ComposeVersion { get; set; } = "3";
public bool MssqlDataDockerVolume { get; set; }
public string HttpPort { get; set; }
public string HttpsPort { get; set; }

View File

@ -3,12 +3,12 @@
#
#########################################################################
# WARNING: This file is generated. Do not make changes to this file. #
# They will be overwritten on update. If you want to make additions to #
# They will be overwritten on update. If you want to make additions to #
# this file, you can create a `docker-compose.override.yml` file in the #
# same directory and it will be merged into this file at runtime. #
# same directory and it will be merged into this file at runtime. #
#########################################################################
version: '3'
version: '{{{ComposeVersion}}}'
services:
mssql:

View File

@ -1,7 +1,7 @@
#########################################################################
# WARNING: This file is generated. Do not make changes to this file. #
# They will be overwritten on update. #
#########################################################################
######################################################################
# WARNING: This file is generated. Do not make changes to this file. #
# They will be overwritten on update. #
######################################################################
server {
listen 8080 default_server;