mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2025-12-19 06:34:23 +01:00
format file
This commit is contained in:
@@ -8,10 +8,10 @@ namespace DockerGenerator
|
|||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? FindRoot("app")
|
var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1"
|
||||||
|
? FindRoot("app")
|
||||||
: Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), ".."));
|
: Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), ".."));
|
||||||
|
|
||||||
var composition = DockerComposition.FromEnvironmentVariables();
|
var composition = DockerComposition.FromEnvironmentVariables();
|
||||||
@@ -27,7 +27,9 @@ namespace DockerGenerator
|
|||||||
|
|
||||||
private void Run(DockerComposition composition, string name, string output)
|
private void Run(DockerComposition composition, string name, string output)
|
||||||
{
|
{
|
||||||
var fragmentLocation = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? "app" : "docker-compose-generator";
|
var fragmentLocation = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1"
|
||||||
|
? "app"
|
||||||
|
: "docker-compose-generator";
|
||||||
fragmentLocation = FindRoot(fragmentLocation);
|
fragmentLocation = FindRoot(fragmentLocation);
|
||||||
fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments"));
|
fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments"));
|
||||||
|
|
||||||
@@ -49,11 +51,14 @@ namespace DockerGenerator
|
|||||||
fragments.Add("btcpayserver-noreverseproxy");
|
fragments.Add("btcpayserver-noreverseproxy");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fragments.Add("btcpayserver");
|
fragments.Add("btcpayserver");
|
||||||
fragments.Add("nbxplorer");
|
fragments.Add("nbxplorer");
|
||||||
if(composition.SelectedDatabase != "sqlite"){
|
if (composition.SelectedDatabase != "sqlite")
|
||||||
|
{
|
||||||
fragments.Add(composition.SelectedDatabase);
|
fragments.Add(composition.SelectedDatabase);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var crypto in CryptoDefinition.GetDefinitions())
|
foreach (var crypto in CryptoDefinition.GetDefinitions())
|
||||||
{
|
{
|
||||||
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
|
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
|
||||||
@@ -64,6 +69,7 @@ namespace DockerGenerator
|
|||||||
{
|
{
|
||||||
fragments.Add(crypto.CLightningFragment);
|
fragments.Add(crypto.CLightningFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
|
if (composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
|
||||||
{
|
{
|
||||||
fragments.Add(crypto.LNDFragment);
|
fragments.Add(crypto.LNDFragment);
|
||||||
@@ -96,4 +102,4 @@ namespace DockerGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user