mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-12 13:00:41 +02:00
Add support for Additional fragment to the builder
This commit is contained in:
parent
9d2e979aee
commit
9c46bde7dc
2
docker-compose-generator/.editorconfig
Normal file
2
docker-compose-generator/.editorconfig
Normal file
@ -0,0 +1,2 @@
|
||||
[*.cs]
|
||||
indent_style = tab
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user