From 550e7bd88c7dc199f69d39b1c441686fdf45e190 Mon Sep 17 00:00:00 2001 From: Vutov Date: Thu, 19 Jul 2018 22:07:25 +0300 Subject: [PATCH 1/5] BTG Lnd docker fragment --- .../docker-fragments/bgold-lnd.yml | 62 +++++++++++++++++++ .../src/CryptoDefinition.cs | 5 +- 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 docker-compose-generator/docker-fragments/bgold-lnd.yml diff --git a/docker-compose-generator/docker-fragments/bgold-lnd.yml b/docker-compose-generator/docker-fragments/bgold-lnd.yml new file mode 100644 index 0000000..73573db --- /dev/null +++ b/docker-compose-generator/docker-fragments/bgold-lnd.yml @@ -0,0 +1,62 @@ +version: "3" + +services: + lnd_bitcoingold: + image: kamigawabul/btglnd:latest + container_name: btcpayserver_lnd_bitcoingold + restart: unless-stopped + environment: + LND_CHAIN: "btg" + LND_ENVIRONMENT: "${NBITCOIN_NETWORK:-regtest}" + LND_EXTRA_ARGS: | + restlisten=0.0.0.0:8080 + rpclisten=127.0.0.1:10008 + rpclisten=0.0.0.0:10009 + bitcoingold.node=bgoldd + bgoldd.rpchost=bgoldd:43782 + bgoldd.zmqpath=tcp://bgoldd:28332 + externalip=${BTCPAY_HOST}:9735 + alias=${LIGHTNING_ALIAS} + noencryptwallet=1 + ports: + - "9735:9735" + expose: + - "8080" + - "9735" + volumes: + - "lnd_bitcoingold_datadir:/data" + - "bgold_datadir:/deps/.bitcoingold" + links: + - bgoldd + + btcpayserver: + environment: + BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoingold:8080/;macaroonfilepath=/etc/lnd_bitcoingold/admin.macaroon;allowinsecure=true" + volumes: + - "lnd_bitcoingold_datadir:/etc/lnd_bitcoingold" + links: + - lnd_bitcoingold + + bgoldd: + environment: + BITCOIN_EXTRA_ARGS: | + zmqpubrawtx=tcp://0.0.0.0:28332 + zmqpubrawblock=tcp://0.0.0.0:28332 + zmqpubrawtxlock=tcp://0.0.0.0:28332 + zmqpubhashblock=tcp://0.0.0.0:28332 + expose: + - "28332" + + nginx: + links: + - "lnd_bitcoingold" + volumes: + - "lnd_bitcoingold_datadir:/lnd" + nginx-gen: + links: + - "lnd_bitcoingold" + volumes: + - "lnd_bitcoingold_datadir:/lnd" + +volumes: + lnd_bitcoingold_datadir: \ No newline at end of file diff --git a/docker-compose-generator/src/CryptoDefinition.cs b/docker-compose-generator/src/CryptoDefinition.cs index 879c17b..fe37845 100644 --- a/docker-compose-generator/src/CryptoDefinition.cs +++ b/docker-compose-generator/src/CryptoDefinition.cs @@ -48,8 +48,9 @@ namespace DockerGenerator new CryptoDefinition() { Crypto = "btg", - CryptoFragment = "bgold" - }, + CryptoFragment = "bgold", + LNDFragment = "bgold-lnd" + }, new CryptoDefinition() { Crypto = "ftc", From 7e40ed6e292769f19ca40faf5cc42bc48a834248 Mon Sep 17 00:00:00 2001 From: Vutov Date: Fri, 20 Jul 2018 10:10:24 +0300 Subject: [PATCH 2/5] Indentation fix? --- docker-compose-generator/src/CryptoDefinition.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose-generator/src/CryptoDefinition.cs b/docker-compose-generator/src/CryptoDefinition.cs index fe37845..3ccf809 100644 --- a/docker-compose-generator/src/CryptoDefinition.cs +++ b/docker-compose-generator/src/CryptoDefinition.cs @@ -45,11 +45,11 @@ namespace DockerGenerator CLightningFragment = "bitcoin-clightning", LNDFragment = "bitcoin-lnd" }, - new CryptoDefinition() - { - Crypto = "btg", - CryptoFragment = "bgold", - LNDFragment = "bgold-lnd" + new CryptoDefinition() + { + Crypto = "btg", + CryptoFragment = "bgold", + LNDFragment = "bgold-lnd" }, new CryptoDefinition() { From 5e79b93b0a2dfcf2e3ab99905b8755edaeb2688f Mon Sep 17 00:00:00 2001 From: Vutov Date: Fri, 20 Jul 2018 10:12:28 +0300 Subject: [PATCH 3/5] Indentation please... --- .../src/CryptoDefinition.cs | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/docker-compose-generator/src/CryptoDefinition.cs b/docker-compose-generator/src/CryptoDefinition.cs index 3ccf809..253b351 100644 --- a/docker-compose-generator/src/CryptoDefinition.cs +++ b/docker-compose-generator/src/CryptoDefinition.cs @@ -6,21 +6,21 @@ namespace DockerGenerator { public class CryptoDefinition { - public string Crypto - { - get; - private set; - } - public string CryptoFragment - { - get; - private set; - } - public string CLightningFragment - { - get; - private set; - } + public string Crypto + { + get; + private set; + } + public string CryptoFragment + { + get; + private set; + } + public string CLightningFragment + { + get; + private set; + } public string LNDFragment { get; @@ -28,40 +28,40 @@ namespace DockerGenerator } public static CryptoDefinition[] GetDefinitions() - { - return new[] - { - new CryptoDefinition() - { - Crypto = "ltc", - CryptoFragment = "litecoin", - CLightningFragment = "litecoin-clightning", + { + return new[] + { + new CryptoDefinition() + { + Crypto = "ltc", + CryptoFragment = "litecoin", + CLightningFragment = "litecoin-clightning", LNDFragment = "litecoin-lnd" }, - new CryptoDefinition() - { - Crypto = "btc", - CryptoFragment = "bitcoin", - CLightningFragment = "bitcoin-clightning", + new CryptoDefinition() + { + Crypto = "btc", + CryptoFragment = "bitcoin", + CLightningFragment = "bitcoin-clightning", LNDFragment = "bitcoin-lnd" - }, - new CryptoDefinition() - { - Crypto = "btg", - CryptoFragment = "bgold", - LNDFragment = "bgold-lnd" }, - new CryptoDefinition() - { - Crypto = "ftc", - CryptoFragment = "feathercoin" - }, + new CryptoDefinition() + { + Crypto = "btg", + CryptoFragment = "bgold", + LNDFragment = "bgold-lnd" + }, + new CryptoDefinition() + { + Crypto = "ftc", + CryptoFragment = "feathercoin" + }, new CryptoDefinition() { Crypto = "grs", CryptoFragment = "groestlcoin" } }; - } + } } } From 022a8b4f65b38353e6e19137b5b313ff03a25d75 Mon Sep 17 00:00:00 2001 From: Vutov Date: Fri, 20 Jul 2018 10:22:22 +0300 Subject: [PATCH 4/5] Added bgold-lncli --- bgold-lncli.ps1 | 1 + bgold-lncli.sh | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 bgold-lncli.ps1 create mode 100644 bgold-lncli.sh diff --git a/bgold-lncli.ps1 b/bgold-lncli.ps1 new file mode 100644 index 0000000..b889d69 --- /dev/null +++ b/bgold-lncli.ps1 @@ -0,0 +1 @@ +docker exec -ti btcpayserver_lnd_bitcoingold lncli $args diff --git a/bgold-lncli.sh b/bgold-lncli.sh new file mode 100644 index 0000000..474390d --- /dev/null +++ b/bgold-lncli.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -ti btcpayserver_lnd_bitcoingold lncli "$@" From 90a238750c1869bd407b2035533461126be83ca8 Mon Sep 17 00:00:00 2001 From: vutov Date: Fri, 20 Jul 2018 10:27:28 +0300 Subject: [PATCH 5/5] chmod +x --- bgold-lncli.ps1 | 0 bgold-lncli.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bgold-lncli.ps1 mode change 100644 => 100755 bgold-lncli.sh diff --git a/bgold-lncli.ps1 b/bgold-lncli.ps1 old mode 100644 new mode 100755 diff --git a/bgold-lncli.sh b/bgold-lncli.sh old mode 100644 new mode 100755