1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

pass versions through params

This commit is contained in:
Kyle Spearrin
2017-11-07 10:54:00 -05:00
parent 35ff3103a8
commit ccf5eec481
2 changed files with 25 additions and 8 deletions

View File

@ -5,17 +5,25 @@ namespace Bit.Setup
{
public class DockerComposeBuilder
{
private const string CoreVersion = "1.13.1";
private const string WebVersion = "1.19.0";
public DockerComposeBuilder(string os)
public DockerComposeBuilder(string os, string webVersion, string coreVersion)
{
MssqlDataDockerVolume = os == "mac";
if(!string.IsNullOrWhiteSpace(webVersion))
{
WebVersion = webVersion;
}
if(!string.IsNullOrWhiteSpace(coreVersion))
{
CoreVersion = coreVersion;
}
}
public bool MssqlDataDockerVolume { get; private set; }
public int HttpPort { get; private set; } = 80;
public int HttpsPort { get; private set; } = 443;
public string CoreVersion { get; private set; } = "latest";
public string WebVersion { get; private set; } = "latest";
public void BuildForInstaller(int httpPort, int httpsPort)
{
@ -162,8 +170,7 @@ volumes:
}
// New line at end of file.
sw.Write(@"
");
sw.Write("\n");
}
}
}