Add support for Additional fragment to the builder
This commit is contained in:
@@ -4,8 +4,8 @@ using System.Text;
|
||||
|
||||
namespace DockerGenerator
|
||||
{
|
||||
public class DockerComposition
|
||||
{
|
||||
public class DockerComposition
|
||||
{
|
||||
public HashSet<string> SelectedCryptos
|
||||
{
|
||||
get;
|
||||
@@ -21,6 +21,11 @@ namespace DockerGenerator
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string[] AdditionalFragments
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public static DockerComposition FromEnvironmentVariables()
|
||||
{
|
||||
@@ -35,7 +40,8 @@ namespace DockerGenerator
|
||||
}
|
||||
composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant();
|
||||
composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant();
|
||||
composition.AdditionalFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_ADDITIONAL_FRAGMENTS") ?? "").ToLowerInvariant().Split(';');
|
||||
return composition;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,6 +92,11 @@ namespace DockerGenerator
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var fragment in composition.AdditionalFragments)
|
||||
{
|
||||
fragments.Add(fragment.Trim());
|
||||
}
|
||||
|
||||
var def = new DockerComposeDefinition(name, fragments);
|
||||
def.FragmentLocation = fragmentLocation;
|
||||
def.BuildOutputDirectory = output;
|
||||
|
||||
Reference in New Issue
Block a user