From 343872d3e3b225c3d4297d9e3b399f302abe6818 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 20 Apr 2020 19:44:40 +0530 Subject: [PATCH 1/4] replace invoicer with middleware --- configure-box.sh | 2 -- docker-compose.yml | 16 +++++++++++----- invoicer/invoicer.conf | 29 ----------------------------- invoicer/www/.gitkeep | 0 4 files changed, 11 insertions(+), 36 deletions(-) delete mode 100644 invoicer/invoicer.conf delete mode 100644 invoicer/www/.gitkeep diff --git a/configure-box.sh b/configure-box.sh index 44095df..f7d88f8 100755 --- a/configure-box.sh +++ b/configure-box.sh @@ -23,8 +23,6 @@ cd .. echo "Installing RPCAuth into bitcoin.conf" cat secrets/rpcauth.txt >> bitcoin/bitcoin.conf RPCPASS=`cat secrets/rpcpass.txt` -echo "Configuring invoicer rpc info" -sed -i "s/RPCPASS/${RPCPASS}/g; " invoicer/invoicer.conf echo "Configuring LND rpc info" sed -i "s/RPCPASS/${RPCPASS}/g; " lnd/lnd.conf if [ ! -z $TESTNET ]; then diff --git a/docker-compose.yml b/docker-compose.yml index a9bcde1..0179bde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,15 +40,21 @@ services: depends_on: [ bitcoin, web ] network_mode: host stop_grace_period: 1m30s - invoicer: - image: "lncm/invoicer:v0.6.6" + middleware: + image: getumbrel/middleware:v0.0.2 depends_on: [ bitcoin, lnd ] + logging: *default-logging restart: on-failure network_mode: host volumes: - - "${HOME}/invoicer:/root/.lncm" - - "${HOME}/invoicer:/lncm" - - "${HOME}/lnd:/lnd" + - "${HOME}/lnd:/lnd" + environment: + BITCOIN_NETWORK: "mainnet" + BITCOIN_HOST: "0.0.0.0" + RPC_USER: "" + RPC_PASSWORD: "" + LND_NETWORK: "mainnet" + LND_HOST: "127.0.0.1" lnd-unlock: build: ${HOME}/build/lnd-unlock/ depends_on: [ lnd ] diff --git a/invoicer/invoicer.conf b/invoicer/invoicer.conf deleted file mode 100644 index b5fbfae..0000000 --- a/invoicer/invoicer.conf +++ /dev/null @@ -1,29 +0,0 @@ -# Note: all values used in this file are defaults that are used if nothing is provided - -port = 8181 -static-dir = "/lncm/www/" -log-file = "/lncm/invoicer.log" -ln-client = "lnd" - -off-chain-only = false - -[bitcoind] -host = "localhost" -port = 8332 -user = "lncm" -pass = "RPCPASS" - -[lnd] -host = "localhost" -port = 10009 -tls = "/lnd/tls.cert" -kill-count = 4 - -[lnd.macaroon] -invoice = "/lnd/data/chain/bitcoin/mainnet/invoice.macaroon" -readonly = "/lnd/data/chain/bitcoin/mainnet/readonly.macaroon" - - -[users] -# username = "password" - diff --git a/invoicer/www/.gitkeep b/invoicer/www/.gitkeep deleted file mode 100644 index e69de29..0000000 From 4cdbb9f7aab70da33fcdd19a08c2ff1cb6e38e8d Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 20 Apr 2020 19:45:46 +0530 Subject: [PATCH 2/4] nginx api config --- nginx/conf.d/default.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 85c4971..ec7cbd3 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -10,8 +10,8 @@ server { try_files $uri $uri/ /index.html; } - location /invoicer/ { + location /api/ { add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - proxy_pass http://localhost:8181/api/; + proxy_pass http://localhost:3005/; } } From 5965adc3e41d510d9aa28240025e903bf89d7e8f Mon Sep 17 00:00:00 2001 From: Mayank Chhabra Date: Mon, 27 Apr 2020 00:45:44 +0530 Subject: [PATCH 3/4] v0.0.4 middleware --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0179bde..aecb1cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: network_mode: host stop_grace_period: 1m30s middleware: - image: getumbrel/middleware:v0.0.2 + image: getumbrel/middleware:v0.0.4 depends_on: [ bitcoin, lnd ] logging: *default-logging restart: on-failure From 7be1a20e0e569c0b2cd25d9310da8bc9e021d6ff Mon Sep 17 00:00:00 2001 From: Mayank Date: Wed, 6 May 2020 16:23:28 +0530 Subject: [PATCH 4/4] v0.0.5 middleware --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index aecb1cc..7f58666 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,7 @@ services: network_mode: host stop_grace_period: 1m30s middleware: - image: getumbrel/middleware:v0.0.4 + image: getumbrel/middleware:v0.0.5 depends_on: [ bitcoin, lnd ] logging: *default-logging restart: on-failure @@ -49,8 +49,8 @@ services: volumes: - "${HOME}/lnd:/lnd" environment: - BITCOIN_NETWORK: "mainnet" BITCOIN_HOST: "0.0.0.0" + RPC_PORT: "8332" RPC_USER: "" RPC_PASSWORD: "" LND_NETWORK: "mainnet"