mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-12 21:10:42 +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
|
namespace DockerGenerator
|
||||||
{
|
{
|
||||||
public class DockerComposition
|
public class DockerComposition
|
||||||
{
|
{
|
||||||
public HashSet<string> SelectedCryptos
|
public HashSet<string> SelectedCryptos
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
@ -21,6 +21,11 @@ namespace DockerGenerator
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
public string[] AdditionalFragments
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
public static DockerComposition FromEnvironmentVariables()
|
public static DockerComposition FromEnvironmentVariables()
|
||||||
{
|
{
|
||||||
@ -35,7 +40,8 @@ namespace DockerGenerator
|
|||||||
}
|
}
|
||||||
composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant();
|
composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant();
|
||||||
composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant();
|
composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant();
|
||||||
|
composition.AdditionalFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_ADDITIONAL_FRAGMENTS") ?? "").ToLowerInvariant().Split(';');
|
||||||
return composition;
|
return composition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,11 @@ namespace DockerGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(var fragment in composition.AdditionalFragments)
|
||||||
|
{
|
||||||
|
fragments.Add(fragment.Trim());
|
||||||
|
}
|
||||||
|
|
||||||
var def = new DockerComposeDefinition(name, fragments);
|
var def = new DockerComposeDefinition(name, fragments);
|
||||||
def.FragmentLocation = fragmentLocation;
|
def.FragmentLocation = fragmentLocation;
|
||||||
def.BuildOutputDirectory = output;
|
def.BuildOutputDirectory = output;
|
||||||
|
Loading…
Reference in New Issue
Block a user