From 32ed14c5eee1336ec63b881fe603fd99b8cbe99e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 16 May 2018 02:31:06 +0900 Subject: [PATCH 1/8] bump --- Production-NoReverseProxy/docker-compose.btc-clightning.yml | 4 ++-- .../docker-compose.btc-ltc-clightning.yml | 6 +++--- Production-NoReverseProxy/docker-compose.btc-ltc.yml | 2 +- Production-NoReverseProxy/docker-compose.btc.yml | 2 +- Production-NoReverseProxy/docker-compose.ltc-clightning.yml | 4 ++-- Production-NoReverseProxy/docker-compose.ltc.yml | 2 +- Production/docker-compose.btc-clightning.yml | 4 ++-- Production/docker-compose.btc-ltc-clightning.yml | 6 +++--- Production/docker-compose.btc-ltc.yml | 2 +- Production/docker-compose.btc.yml | 2 +- Production/docker-compose.ltc-clightning.yml | 4 ++-- Production/docker-compose.ltc.yml | 2 +- .../docker-fragments/bitcoin-clightning.yml | 2 +- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- .../docker-fragments/litecoin-clightning.yml | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Production-NoReverseProxy/docker-compose.btc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-clightning.yml index 06dc2c3..84776ba 100644 --- a/Production-NoReverseProxy/docker-compose.btc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -67,7 +67,7 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_bitcoin restart: always environment: diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml index aa1b753..f3c52d8 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -75,7 +75,7 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_litecoin restart: always environment: @@ -110,7 +110,7 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_bitcoin restart: always environment: diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc.yml b/Production-NoReverseProxy/docker-compose.btc-ltc.yml index cf841b8..7632d43 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.btc.yml b/Production-NoReverseProxy/docker-compose.btc.yml index 80419bb..ef34e17 100644 --- a/Production-NoReverseProxy/docker-compose.btc.yml +++ b/Production-NoReverseProxy/docker-compose.btc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml index cac6396..68ed317 100644 --- a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -67,7 +67,7 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_litecoin restart: always environment: diff --git a/Production-NoReverseProxy/docker-compose.ltc.yml b/Production-NoReverseProxy/docker-compose.ltc.yml index e9a6574..29d34d1 100644 --- a/Production-NoReverseProxy/docker-compose.ltc.yml +++ b/Production-NoReverseProxy/docker-compose.ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/Production/docker-compose.btc-clightning.yml b/Production/docker-compose.btc-clightning.yml index 9777eed..5942a6c 100644 --- a/Production/docker-compose.btc-clightning.yml +++ b/Production/docker-compose.btc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -109,7 +109,7 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_bitcoin restart: always environment: diff --git a/Production/docker-compose.btc-ltc-clightning.yml b/Production/docker-compose.btc-ltc-clightning.yml index 69689d9..73cdc99 100644 --- a/Production/docker-compose.btc-ltc-clightning.yml +++ b/Production/docker-compose.btc-ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -117,7 +117,7 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_litecoin restart: always environment: @@ -152,7 +152,7 @@ services: volumes: - "bitcoin_datadir:/data" clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_bitcoin restart: always environment: diff --git a/Production/docker-compose.btc-ltc.yml b/Production/docker-compose.btc-ltc.yml index 8f1efb8..a29d31a 100644 --- a/Production/docker-compose.btc-ltc.yml +++ b/Production/docker-compose.btc-ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/Production/docker-compose.btc.yml b/Production/docker-compose.btc.yml index a73e1bf..f537d0a 100644 --- a/Production/docker-compose.btc.yml +++ b/Production/docker-compose.btc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/Production/docker-compose.ltc-clightning.yml b/Production/docker-compose.ltc-clightning.yml index 48ffbae..e7668de 100644 --- a/Production/docker-compose.ltc-clightning.yml +++ b/Production/docker-compose.ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: @@ -109,7 +109,7 @@ services: volumes: - "litecoin_datadir:/data" clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_litecoin restart: always environment: diff --git a/Production/docker-compose.ltc.yml b/Production/docker-compose.ltc.yml index 5c5fc68..540ef1b 100644 --- a/Production/docker-compose.ltc.yml +++ b/Production/docker-compose.ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 0496025..edc4190 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_bitcoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_bitcoin restart: always environment: diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 1e1b6f8..7423e5f 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.18 + image: nicolasdorier/btcpayserver:1.0.2.20 expose: - "49392" environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index b39fd32..240e6aa 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_litecoin: - image: nicolasdorier/clightning:0.0.0.14 + image: nicolasdorier/clightning:0.0.0.16 container_name: btcpayserver_clightning_litecoin restart: always environment: From bbb0d650b173540e4d6402f0463fe6db59eb2ca5 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 16 May 2018 11:08:59 +0900 Subject: [PATCH 2/8] bump --- Production-NoReverseProxy/docker-compose.btc-clightning.yml | 2 +- Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml | 2 +- Production-NoReverseProxy/docker-compose.btc-ltc.yml | 2 +- Production-NoReverseProxy/docker-compose.btc.yml | 2 +- Production-NoReverseProxy/docker-compose.ltc-clightning.yml | 2 +- Production-NoReverseProxy/docker-compose.ltc.yml | 2 +- Production/docker-compose.btc-clightning.yml | 2 +- Production/docker-compose.btc-ltc-clightning.yml | 2 +- Production/docker-compose.btc-ltc.yml | 2 +- Production/docker-compose.btc.yml | 2 +- Production/docker-compose.ltc-clightning.yml | 2 +- Production/docker-compose.ltc.yml | 2 +- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Production-NoReverseProxy/docker-compose.btc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-clightning.yml index 84776ba..4ce650b 100644 --- a/Production-NoReverseProxy/docker-compose.btc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml index f3c52d8..1c9e32c 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc.yml b/Production-NoReverseProxy/docker-compose.btc-ltc.yml index 7632d43..649be05 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.btc.yml b/Production-NoReverseProxy/docker-compose.btc.yml index ef34e17..bc37c9a 100644 --- a/Production-NoReverseProxy/docker-compose.btc.yml +++ b/Production-NoReverseProxy/docker-compose.btc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml index 68ed317..b6e1bdd 100644 --- a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production-NoReverseProxy/docker-compose.ltc.yml b/Production-NoReverseProxy/docker-compose.ltc.yml index 29d34d1..b79258d 100644 --- a/Production-NoReverseProxy/docker-compose.ltc.yml +++ b/Production-NoReverseProxy/docker-compose.ltc.yml @@ -2,7 +2,7 @@ version: "3" services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.btc-clightning.yml b/Production/docker-compose.btc-clightning.yml index 5942a6c..f8dbed3 100644 --- a/Production/docker-compose.btc-clightning.yml +++ b/Production/docker-compose.btc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.btc-ltc-clightning.yml b/Production/docker-compose.btc-ltc-clightning.yml index 73cdc99..cf2662f 100644 --- a/Production/docker-compose.btc-ltc-clightning.yml +++ b/Production/docker-compose.btc-ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.btc-ltc.yml b/Production/docker-compose.btc-ltc.yml index a29d31a..489d46c 100644 --- a/Production/docker-compose.btc-ltc.yml +++ b/Production/docker-compose.btc-ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.btc.yml b/Production/docker-compose.btc.yml index f537d0a..840b4fa 100644 --- a/Production/docker-compose.btc.yml +++ b/Production/docker-compose.btc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.ltc-clightning.yml b/Production/docker-compose.ltc-clightning.yml index e7668de..cb91b03 100644 --- a/Production/docker-compose.ltc-clightning.yml +++ b/Production/docker-compose.ltc-clightning.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/Production/docker-compose.ltc.yml b/Production/docker-compose.ltc.yml index 540ef1b..28f116c 100644 --- a/Production/docker-compose.ltc.yml +++ b/Production/docker-compose.ltc.yml @@ -46,7 +46,7 @@ services: - nginx-gen btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 7423e5f..25cd3c8 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: always - image: nicolasdorier/btcpayserver:1.0.2.20 + image: nicolasdorier/btcpayserver:1.0.2.21 expose: - "49392" environment: From 045debafec4f496e677530138fc0f7cc08cc4001 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 00:13:22 +0900 Subject: [PATCH 3/8] Refactor docker-compose-generator so that generation can be dynamic --- .gitignore | 1 + docker-compose-generator/Dockerfile | 2 + .../src/CryptoDefinition.cs | 44 +++++ .../src/DockerComposition.cs | 41 +++++ docker-compose-generator/src/Program.cs | 155 +++++++++--------- .../src/Properties/launchSettings.json | 14 ++ generate-docker-compose.ps1 | 2 +- generate-docker-compose.sh | 2 +- 8 files changed, 177 insertions(+), 84 deletions(-) create mode 100644 docker-compose-generator/src/CryptoDefinition.cs create mode 100644 docker-compose-generator/src/DockerComposition.cs create mode 100644 docker-compose-generator/src/Properties/launchSettings.json diff --git a/.gitignore b/.gitignore index 00f3bfd..ca3fc1d 100644 --- a/.gitignore +++ b/.gitignore @@ -295,3 +295,4 @@ BTCPayServer/wwwroot/bundles/* Production/.env .env .vscode/ +/docker-compose.generated.yml diff --git a/docker-compose-generator/Dockerfile b/docker-compose-generator/Dockerfile index ee3eefa..20517d3 100644 --- a/docker-compose-generator/Dockerfile +++ b/docker-compose-generator/Dockerfile @@ -13,6 +13,8 @@ RUN mkdir /datadir ENV APP_DATADIR=/datadir VOLUME /datadir +ENV INSIDE_CONTAINER=1 + COPY --from=builder "/app" . COPY docker-fragments docker-fragments diff --git a/docker-compose-generator/src/CryptoDefinition.cs b/docker-compose-generator/src/CryptoDefinition.cs new file mode 100644 index 0000000..7994dd1 --- /dev/null +++ b/docker-compose-generator/src/CryptoDefinition.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace DockerGenerator +{ + public class CryptoDefinition + { + public string Crypto + { + get; + private set; + } + public string CryptoFragment + { + get; + private set; + } + public string CLightningFragment + { + get; + private set; + } + + public static CryptoDefinition[] GetDefinitions() + { + return new[] + { + new CryptoDefinition() + { + Crypto = "ltc", + CryptoFragment = "litecoin", + CLightningFragment = "litecoin-clightning", + }, + new CryptoDefinition() + { + Crypto = "btc", + CryptoFragment = "bitcoin", + CLightningFragment = "bitcoin-clightning", + }, + }; + } + } +} diff --git a/docker-compose-generator/src/DockerComposition.cs b/docker-compose-generator/src/DockerComposition.cs new file mode 100644 index 0000000..b4df35b --- /dev/null +++ b/docker-compose-generator/src/DockerComposition.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace DockerGenerator +{ + public class DockerComposition + { + public HashSet SelectedCryptos + { + get; + set; + } + public string SelectedProxy + { + get; + set; + } + public string SelectedLN + { + get; + set; + } + + public static DockerComposition FromEnvironmentVariables() + { + DockerComposition composition = new DockerComposition(); + composition.SelectedCryptos = new HashSet(); + for(int i = 1; i < 10; i++) + { + var selectedCrypto = Environment.GetEnvironmentVariable("BTCPAYGEN_CRYPTO" + i); + if(string.IsNullOrEmpty(selectedCrypto)) + break; + composition.SelectedCryptos.Add(selectedCrypto.ToLowerInvariant()); + } + composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant(); + composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant(); + return composition; + } + } +} diff --git a/docker-compose-generator/src/Program.cs b/docker-compose-generator/src/Program.cs index 299b663..9c0e159 100644 --- a/docker-compose-generator/src/Program.cs +++ b/docker-compose-generator/src/Program.cs @@ -8,108 +8,99 @@ namespace DockerGenerator { class Program { + static void Main(string[] args) { - new Program().Run(); + var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? FindRoot("app") + : Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), "..")); + + if(args.Any(a => a == "pregen")) + { + var productionLocation = Path.GetFullPath(Path.Combine(root, "Production")); + var testLocation = Path.GetFullPath(Path.Combine(root, "Production-NoReverseProxy")); + + foreach(var proxy in new[] { "nginx", "no-reverseproxy" }) + { + foreach(var lightning in new[] { "clightning", "" }) + { + foreach(var btc in new[] { "btc", "" }) + { + foreach(var ltc in new[] { "ltc", "" }) + { + if(btc == "" && ltc == "") + continue; + string name = $"{btc}-{ltc}-{lightning}".Replace("--", "-"); + if(name.EndsWith("-")) + name = name.Substring(0, name.Length - 1); + if(name.StartsWith("-")) + name = name.Substring(1, name.Length - 1); + var composition = new DockerComposition(); + composition.SelectedCryptos = new HashSet(); + composition.SelectedCryptos.Add(btc); + composition.SelectedCryptos.Add(ltc); + composition.SelectedLN = lightning; + composition.SelectedProxy = proxy; + new Program().Run(composition, name, proxy == "nginx" ? productionLocation : testLocation); + } + } + } + } + } + else + { + var composition = DockerComposition.FromEnvironmentVariables(); + Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray())); + Console.WriteLine("Lightning: " + composition.SelectedLN); + Console.WriteLine("ReverseProxy: " + composition.SelectedProxy); + new Program().Run(composition, "generated", root); + } } - private void Run() + private void Run(DockerComposition composition, string name, string output) { - var fragmentLocation = FindLocation("docker-fragments"); - var productionLocation = FindLocation("Production"); - var testLocation = FindLocation("Production-NoReverseProxy"); + var fragmentLocation = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? "app" : "docker-compose-generator"; + fragmentLocation = FindRoot(fragmentLocation); + fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments")); - HashSet processed = new HashSet(); - foreach(var permutation in ItemCombinations(new[] { "btc", "ltc", "clightning" }.ToList())) + var fragments = new List(); + if(composition.SelectedProxy == "nginx") { - if(permutation.Count == 1 && permutation.First() == "clightning") - continue; - permutation.Sort(); - if(permutation.Remove("clightning")) - permutation.Add("clightning"); // ensure clightning at the end - string id = string.Join('-', permutation); - if(!processed.Add(id)) - continue; - - var fragments = new List(); fragments.Add("nginx"); - fragments.Add("btcpayserver"); - - if(permutation.Contains("ltc")) - { - fragments.Add("litecoin"); - if(permutation.Contains("clightning")) - fragments.Add("litecoin-clightning"); - } - if(permutation.Contains("btc")) - { - fragments.Add("bitcoin"); - if(permutation.Contains("clightning")) - fragments.Add("bitcoin-clightning"); - } - - var def = new DockerComposeDefinition(id, fragments); - def.FragmentLocation = fragmentLocation; - def.BuildOutputDirectory = productionLocation; - def.Build(); - - - def.Fragments.Remove("nginx"); - def.Fragments.Add("btcpayserver-noreverseproxy"); - def.BuildOutputDirectory = testLocation; - def.Build(); } - } - - /// - /// Method to create lists containing possible combinations of an input list of items. This is - /// basically copied from code by user "jaolho" on this thread: - /// http://stackoverflow.com/questions/7802822/all-possible-combinations-of-a-list-of-values - /// - /// type of the items on the input list - /// list of items - /// minimum number of items wanted in the generated combinations, - /// if zero the empty combination is included, - /// default is one - /// maximum number of items wanted in the generated combinations, - /// default is no maximum limit - /// list of lists for possible combinations of the input items - public static List> ItemCombinations(List inputList, int minimumItems = 1, - int maximumItems = int.MaxValue) - { - int nonEmptyCombinations = (int)Math.Pow(2, inputList.Count) - 1; - List> listOfLists = new List>(nonEmptyCombinations + 1); - - if(minimumItems == 0) // Optimize default case - listOfLists.Add(new List()); - - for(int i = 1; i <= nonEmptyCombinations; i++) + else { - List thisCombination = new List(inputList.Count); - for(int j = 0; j < inputList.Count; j++) - { - if((i >> j & 1) == 1) - thisCombination.Add(inputList[j]); - } + fragments.Add("btcpayserver-noreverseproxy"); + } + fragments.Add("btcpayserver"); + foreach(var crypto in CryptoDefinition.GetDefinitions()) + { + if(!composition.SelectedCryptos.Contains(crypto.Crypto)) + continue; - if(thisCombination.Count >= minimumItems && thisCombination.Count <= maximumItems) - listOfLists.Add(thisCombination); + fragments.Add(crypto.CryptoFragment); + if(composition.SelectedLN == "clightning" && crypto.CLightningFragment != null) + { + fragments.Add(crypto.CLightningFragment); + } } - return listOfLists; + var def = new DockerComposeDefinition(name, fragments); + def.FragmentLocation = fragmentLocation; + def.BuildOutputDirectory = output; + def.Build(); } - private string FindLocation(string path) + private static string FindRoot(string rootDirectory) { - string directory = path; + string directory = Directory.GetCurrentDirectory(); int i = 0; while(true) { if(i > 10) - throw new DirectoryNotFoundException(directory); - if(Directory.Exists(path)) - return path; - path = Path.Combine("..", path); + throw new DirectoryNotFoundException(rootDirectory); + if(directory.EndsWith(rootDirectory)) + return directory; + directory = Path.GetFullPath(Path.Combine(directory, "..")); i++; } } diff --git a/docker-compose-generator/src/Properties/launchSettings.json b/docker-compose-generator/src/Properties/launchSettings.json new file mode 100644 index 0000000..114251a --- /dev/null +++ b/docker-compose-generator/src/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "profiles": { + "docker-compose-generator": { + "commandName": "Project", + "commandLineArgs": "pregen", + "environmentVariables": { + "BTCPAYGEN_LIGHTNING": "clightning", + "BTCPAYGEN_CRYPTO2": "ltc", + "BTCPAYGEN_CRYPTO1": "btc", + "BTCPAYGEN_REVERSEPROXY": "nginx" + } + } + } +} \ No newline at end of file diff --git a/generate-docker-compose.ps1 b/generate-docker-compose.ps1 index 1b2422c..0fb05d7 100644 --- a/generate-docker-compose.ps1 +++ b/generate-docker-compose.ps1 @@ -1,4 +1,4 @@ # This script will run docker-compose-generator in a container to generate the yml files docker build -t btcpayserver/docker-compose-generator "$(Get-Location)\docker-compose-generator" -docker run -v "$(Get-Location)\Production:/app/Production" -v "$(Get-Location)\Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator \ No newline at end of file +docker run -v "$(Get-Location)\Production:/app/Production" -v "$(Get-Location)\Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator pregen \ No newline at end of file diff --git a/generate-docker-compose.sh b/generate-docker-compose.sh index 47afeb6..434fc80 100755 --- a/generate-docker-compose.sh +++ b/generate-docker-compose.sh @@ -2,4 +2,4 @@ # This script will run docker-compose-generator in a container to generate the yml files docker build -t btcpayserver/docker-compose-generator "$(pwd)/docker-compose-generator" -docker run -v "$(pwd)/Production:/app/Production" -v "$(pwd)/Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator \ No newline at end of file +docker run -v "$(pwd)/Production:/app/Production" -v "$(pwd)/Production-NoReverseProxy:/app/Production-NoReverseProxy" --rm btcpayserver/docker-compose-generator pregen \ No newline at end of file From 446b3db93afd417eb2694fd6259e0a0bb4254092 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 00:19:04 +0900 Subject: [PATCH 4/8] use alpine --- docker-compose-generator/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/Dockerfile b/docker-compose-generator/Dockerfile index 20517d3..c7f4c3d 100644 --- a/docker-compose-generator/Dockerfile +++ b/docker-compose-generator/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/aspnetcore-build:2.0.6-2.1.101-stretch AS builder +FROM microsoft/dotnet:2.1.300-rc1-sdk-alpine3.7 AS builder WORKDIR /source COPY src/docker-compose-generator.csproj docker-compose-generator.csproj # Cache some dependencies @@ -6,7 +6,7 @@ RUN dotnet restore COPY src/. . RUN dotnet publish --output /app/ --configuration Release -FROM microsoft/aspnetcore:2.0.6-stretch +FROM microsoft/dotnet:2.1.0-rc1-runtime-alpine3.7 WORKDIR /app RUN mkdir /datadir From e2b82697a04d12bcafefbe3abe17e873f76f1b4b Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 01:31:36 +0900 Subject: [PATCH 5/8] add build scripts for custom docker-compose --- .gitignore | 2 +- Generated/.gitignore | 1 + README.md | 51 +++++++++++++++++++ ...ate-docker-compose.ps1 => build-pregen.ps1 | 0 generate-docker-compose.sh => build-pregen.sh | 0 build.ps1 | 17 +++++++ build.sh | 18 +++++++ .../src/DockerComposition.cs | 2 +- docker-compose-generator/src/Program.cs | 6 ++- 9 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 Generated/.gitignore rename generate-docker-compose.ps1 => build-pregen.ps1 (100%) mode change 100644 => 100755 rename generate-docker-compose.sh => build-pregen.sh (100%) create mode 100755 build.ps1 create mode 100755 build.sh diff --git a/.gitignore b/.gitignore index ca3fc1d..6faab1d 100644 --- a/.gitignore +++ b/.gitignore @@ -295,4 +295,4 @@ BTCPayServer/wwwroot/bundles/* Production/.env .env .vscode/ -/docker-compose.generated.yml + diff --git a/Generated/.gitignore b/Generated/.gitignore new file mode 100644 index 0000000..ad30bfe --- /dev/null +++ b/Generated/.gitignore @@ -0,0 +1 @@ +*.yml \ No newline at end of file diff --git a/README.md b/README.md index f1a5bab..8a04d8c 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,54 @@ Wait a little bit, then you can now browse `https://btcpay.example.com/`. The files in `Production` and `Production-NoReverseProxy` are generated by a dotnet program located in `docker-compose-generator`. It is meant to generate a wide range a configuration from `docker-compose-generator/docker-fragments` without repeating myself. + +# No docker-compose suit my need, what should I do? + +All `docker-compose` files in [Production](Production) and [Production-NoReverseProxy](Production-NoReverseProxy) are generated by running the [build-pregen.sh](build-pregen.sh) (or [build-pregen.ps1](build-pregen.ps1)) scripts from the fragments located in [docker-compose-generator/docker-fragments](docker-compose-generator/docker-fragments). + +The pre-generated `docker-compose` files cover `btc`, `ltc`, `clightning` for configuration with or without `nginx `reverse proxy. + +If you want any other configuration, you need to run [build.sh](build.sh) (or [build.ps1](build.ps1)) with environment variables correctly set. + +To configure your custom docker-compose, the following environment variables are supported: + +* `BTCPAYGEN_CRYPTO1` to `BTCPAYGEN_CRYPTO9`: Specify support for a crypto currency. (Valid value: `btc`, `ltc`) +* `BTCPAYGEN_REVERSEPROXY`: Specify the reverse proxy to use (Valid value: `nginx`, `none`) +* `BTCPAYGEN_LIGHTNING`: Specify the lightning network implementation (Valid value: `clightning`, `none`) +* `BTCPAYGEN_SUBNAME`: The sub name of the generated docker-compose file, where the full name will be `Generated/docker-compose.SUBNAME.yml` (Default: `generated`) + +Then, running [build.sh](build.sh) (or [build.ps1](build.ps1)) will then generate a `docker-compose.generated.yml` in the root folder of this repository. +For example, if you want `btc` and `ltc` support with `nginx` and `clightning` inside `Generate/docker-compose.custom.yml`: + +On Windows: + +``` +Invoke-Command { + $BTCPAYGEN_CRYPTO1="btc" + $BTCPAYGEN_CRYPTO2="ltc" + $BTCPAYGEN_REVERSEPROXY="nginx" + $BTCPAYGEN_LIGHTNING="clightning" + $BTCPAYGEN_SUBNAME="custom" + . .\build.ps1 +} +``` + +On Linux: + +``` +BTCPAYGEN_CRYPTO1=btc \ +BTCPAYGEN_CRYPTO2=ltc \ +BTCPAYGEN_REVERSEPROXY=nginx \ +BTCPAYGEN_LIGHTNING=cligthning \ +BTCPAYGEN_SUBNAME=custom \ +./build.sh +``` + +# How to extend with my own crypto? + +1. Support for your crypto on [NBitcoin](https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins)/[NBxplorer](https://github.com/dgarage/NBXplorer)/[BTCPay Server](https://github.com/btcpayserver/btcpayserver). (Take example on other coins) +2. Create your own docker image ([Example for BTC](https://hub.docker.com/r/nicolasdorier/docker-bitcoin/)) +3. Create a docker-compose fragment ([Example for BTC](docker-compose-generator/docker-fragments/bitcoin.yml)) +4. Add your Crypto Definition ([Example for BTC](docker-compose-generator/CryptoDefinition.cs)) + +Congratulation! \ No newline at end of file diff --git a/generate-docker-compose.ps1 b/build-pregen.ps1 old mode 100644 new mode 100755 similarity index 100% rename from generate-docker-compose.ps1 rename to build-pregen.ps1 diff --git a/generate-docker-compose.sh b/build-pregen.sh similarity index 100% rename from generate-docker-compose.sh rename to build-pregen.sh diff --git a/build.ps1 b/build.ps1 new file mode 100755 index 0000000..73683e9 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,17 @@ +# This script will run docker-compose-generator in a container to generate the yml files + +docker build -t btcpayserver/docker-compose-generator "$(Get-Location)\docker-compose-generator" +docker run -v "$(Get-Location)\Generated:/app/Generated" ` + -e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" ` + -e "BTCPAYGEN_CRYPTO2=$BTCPAYGEN_CRYPTO2" ` + -e "BTCPAYGEN_CRYPTO3=$BTCPAYGEN_CRYPTO3" ` + -e "BTCPAYGEN_CRYPTO4=$BTCPAYGEN_CRYPTO4" ` + -e "BTCPAYGEN_CRYPTO5=$BTCPAYGEN_CRYPTO5" ` + -e "BTCPAYGEN_CRYPTO6=$BTCPAYGEN_CRYPTO6" ` + -e "BTCPAYGEN_CRYPTO7=$BTCPAYGEN_CRYPTO7" ` + -e "BTCPAYGEN_CRYPTO8=$BTCPAYGEN_CRYPTO8" ` + -e "BTCPAYGEN_CRYPTO9=$BTCPAYGEN_CRYPTO9" ` + -e "BTCPAYGEN_REVERSEPROXY=$BTCPAYGEN_REVERSEPROXY" ` + -e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" ` + -e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" ` + --rm btcpayserver/docker-compose-generator \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7e6e86a --- /dev/null +++ b/build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# This script will run docker-compose-generator in a container to generate the yml files +docker build -t btcpayserver/docker-compose-generator "$(pwd)/docker-compose-generator" +docker run -v "$(pwd)/Generated:/app/Generated" \ + -e "BTCPAYGEN_CRYPTO1=$(BTCPAYGEN_CRYPTO1)" \ + -e "BTCPAYGEN_CRYPTO2=$(BTCPAYGEN_CRYPTO2)" \ + -e "BTCPAYGEN_CRYPTO3=$(BTCPAYGEN_CRYPTO3)" \ + -e "BTCPAYGEN_CRYPTO4=$(BTCPAYGEN_CRYPTO4)" \ + -e "BTCPAYGEN_CRYPTO5=$(BTCPAYGEN_CRYPTO5)" \ + -e "BTCPAYGEN_CRYPTO6=$(BTCPAYGEN_CRYPTO6)" \ + -e "BTCPAYGEN_CRYPTO7=$(BTCPAYGEN_CRYPTO7)" \ + -e "BTCPAYGEN_CRYPTO8=$(BTCPAYGEN_CRYPTO8)" \ + -e "BTCPAYGEN_CRYPTO9=$(BTCPAYGEN_CRYPTO9)" \ + -e "BTCPAYGEN_REVERSEPROXY=$(BTCPAYGEN_REVERSEPROXY)" \ + -e "BTCPAYGEN_LIGHTNING=$(BTCPAYGEN_LIGHTNING)" \ + -e "BTCPAYGEN_SUBNAME=$(BTCPAYGEN_SUBNAME)" \ + --rm btcpayserver/docker-compose-generator \ No newline at end of file diff --git a/docker-compose-generator/src/DockerComposition.cs b/docker-compose-generator/src/DockerComposition.cs index b4df35b..5880064 100644 --- a/docker-compose-generator/src/DockerComposition.cs +++ b/docker-compose-generator/src/DockerComposition.cs @@ -30,7 +30,7 @@ namespace DockerGenerator { var selectedCrypto = Environment.GetEnvironmentVariable("BTCPAYGEN_CRYPTO" + i); if(string.IsNullOrEmpty(selectedCrypto)) - break; + continue; composition.SelectedCryptos.Add(selectedCrypto.ToLowerInvariant()); } composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant(); diff --git a/docker-compose-generator/src/Program.cs b/docker-compose-generator/src/Program.cs index 9c0e159..6e35bd9 100644 --- a/docker-compose-generator/src/Program.cs +++ b/docker-compose-generator/src/Program.cs @@ -52,7 +52,11 @@ namespace DockerGenerator Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray())); Console.WriteLine("Lightning: " + composition.SelectedLN); Console.WriteLine("ReverseProxy: " + composition.SelectedProxy); - new Program().Run(composition, "generated", root); + var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated")); + + var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME"); + name = string.IsNullOrEmpty(name) ? "generated" : name; + new Program().Run(composition, name, generatedLocation); } } From 427263f3c504e88ad9235d6eeddc944c17b755d3 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 01:49:20 +0900 Subject: [PATCH 6/8] fix sh --- README.md | 10 +++++----- build.sh | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8a04d8c..7663af4 100644 --- a/README.md +++ b/README.md @@ -106,11 +106,11 @@ Invoke-Command { On Linux: ``` -BTCPAYGEN_CRYPTO1=btc \ -BTCPAYGEN_CRYPTO2=ltc \ -BTCPAYGEN_REVERSEPROXY=nginx \ -BTCPAYGEN_LIGHTNING=cligthning \ -BTCPAYGEN_SUBNAME=custom \ +BTCPAYGEN_CRYPTO1="btc" \ +BTCPAYGEN_CRYPTO2="ltc" \ +BTCPAYGEN_REVERSEPROXY="nginx" \ +BTCPAYGEN_LIGHTNING="cligthning" \ +BTCPAYGEN_SUBNAME="custom" \ ./build.sh ``` diff --git a/build.sh b/build.sh index 7e6e86a..6ab0708 100755 --- a/build.sh +++ b/build.sh @@ -3,16 +3,16 @@ # This script will run docker-compose-generator in a container to generate the yml files docker build -t btcpayserver/docker-compose-generator "$(pwd)/docker-compose-generator" docker run -v "$(pwd)/Generated:/app/Generated" \ - -e "BTCPAYGEN_CRYPTO1=$(BTCPAYGEN_CRYPTO1)" \ - -e "BTCPAYGEN_CRYPTO2=$(BTCPAYGEN_CRYPTO2)" \ - -e "BTCPAYGEN_CRYPTO3=$(BTCPAYGEN_CRYPTO3)" \ - -e "BTCPAYGEN_CRYPTO4=$(BTCPAYGEN_CRYPTO4)" \ - -e "BTCPAYGEN_CRYPTO5=$(BTCPAYGEN_CRYPTO5)" \ - -e "BTCPAYGEN_CRYPTO6=$(BTCPAYGEN_CRYPTO6)" \ - -e "BTCPAYGEN_CRYPTO7=$(BTCPAYGEN_CRYPTO7)" \ - -e "BTCPAYGEN_CRYPTO8=$(BTCPAYGEN_CRYPTO8)" \ - -e "BTCPAYGEN_CRYPTO9=$(BTCPAYGEN_CRYPTO9)" \ - -e "BTCPAYGEN_REVERSEPROXY=$(BTCPAYGEN_REVERSEPROXY)" \ - -e "BTCPAYGEN_LIGHTNING=$(BTCPAYGEN_LIGHTNING)" \ - -e "BTCPAYGEN_SUBNAME=$(BTCPAYGEN_SUBNAME)" \ + -e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" \ + -e "BTCPAYGEN_CRYPTO2=$BTCPAYGEN_CRYPTO2" \ + -e "BTCPAYGEN_CRYPTO3=$BTCPAYGEN_CRYPTO3" \ + -e "BTCPAYGEN_CRYPTO4=$BTCPAYGEN_CRYPTO4" \ + -e "BTCPAYGEN_CRYPTO5=$BTCPAYGEN_CRYPTO5" \ + -e "BTCPAYGEN_CRYPTO6=$BTCPAYGEN_CRYPTO6" \ + -e "BTCPAYGEN_CRYPTO7=$BTCPAYGEN_CRYPTO7" \ + -e "BTCPAYGEN_CRYPTO8=$BTCPAYGEN_CRYPTO8" \ + -e "BTCPAYGEN_CRYPTO9=$BTCPAYGEN_CRYPTO9" \ + -e "BTCPAYGEN_REVERSEPROXY=$BTCPAYGEN_REVERSEPROXY" \ + -e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \ + -e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \ --rm btcpayserver/docker-compose-generator \ No newline at end of file From 3a16110ab81ba375a6d675f0fb51de79098e1876 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 01:51:26 +0900 Subject: [PATCH 7/8] fix sh --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7663af4..bad6c9c 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ On Linux: BTCPAYGEN_CRYPTO1="btc" \ BTCPAYGEN_CRYPTO2="ltc" \ BTCPAYGEN_REVERSEPROXY="nginx" \ -BTCPAYGEN_LIGHTNING="cligthning" \ +BTCPAYGEN_LIGHTNING="clightning" \ BTCPAYGEN_SUBNAME="custom" \ ./build.sh ``` From e23f9d5cd7dd4027e8a50764efce5e716df4d464 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 17 May 2018 01:52:56 +0900 Subject: [PATCH 8/8] README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bad6c9c..07c7780 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ To configure your custom docker-compose, the following environment variables are Then, running [build.sh](build.sh) (or [build.ps1](build.ps1)) will then generate a `docker-compose.generated.yml` in the root folder of this repository. For example, if you want `btc` and `ltc` support with `nginx` and `clightning` inside `Generate/docker-compose.custom.yml`: +Note: The first run might take a while, but next run are instantaneous. + On Windows: ```