From 79df28b6ed4019bd07f854e023f9093e1f43bbe7 Mon Sep 17 00:00:00 2001 From: d11n Date: Wed, 16 Feb 2022 14:24:05 +0100 Subject: [PATCH] Upgrade LiT to v0.6.2 (includes bugfix) (#602) * Upgrade Lightning Terminal to v0.6.2-alpha Closes btcpayserver/btcpayserver#3459 * Add LIT_PASSWD to .env * Fix and simplify LiT nginx config See lightninglabs/lightning-terminal#306. Fixes btcpayserver/btcpayserver-docker#601 * Mount correct LiT data directory Fixes btcpayserver/btcpayserver-docker#592 --- Production/nginx.tmpl | 22 ++++++------------- README.md | 2 +- contrib/build-all-images.sh | 12 +++++----- .../opt-add-lightning-terminal.yml | 4 ++-- helpers.sh | 9 ++++---- 5 files changed, 20 insertions(+), 29 deletions(-) diff --git a/Production/nginx.tmpl b/Production/nginx.tmpl index 6fb1bf8..48ffc2a 100644 --- a/Production/nginx.tmpl +++ b/Production/nginx.tmpl @@ -119,16 +119,16 @@ proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Proto https; - + sub_filter_once off; sub_filter_types *; - - - + + + sub_filter 'src="/' 'src="/helipad/'; sub_filter 'href="/' 'href="/helipad/'; - sub_filter '/image' '/helipad/image'; - sub_filter '/pew' '/helipad/pew'; + sub_filter '/image' '/helipad/image'; + sub_filter '/pew' '/helipad/pew'; sub_filter '/boosts' '/helipad/boosts'; proxy_pass http://helipad:2112/; @@ -144,15 +144,7 @@ proxy_pass http://lnd_lit:8080/; } - location ~* ^/lnrpc.Lightning/ { - proxy_pass http://lnd_lit:8080; - } - - location ~* ^/looprpc.SwapClient/ { - proxy_pass http://lnd_lit:8080; - } - - location ~* ^/poolrpc.Trader/ { + location ~* ^/(ln|loop|pool|lit)rpc\. { proxy_pass http://lnd_lit:8080; } {{ end }} diff --git a/README.md b/README.md index 995eba7..8fdb538 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,7 @@ We are trying to update our dependencies to run on `arm32v7` and `x64` boards. H | podcastindexorg/podcasting20-helipad | v0.1.6 | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.6/umbrel/Dockerfile) | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.6/umbrel/Dockerfile) | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.6/umbrel/Dockerfile) | [Github](https://github.com/Podcastindex-org/helipad) - [DockerHub](https://hub.docker.com/r/podcastindexorg/podcasting20-helipad) | | jvandrew/librepatron | 0.7.39 | [✔️](https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/JeffVandrewJr/patron) - [DockerHub](https://hub.docker.com/r/jvandrew/librepatron) | | jvandrew/isso | atron.22 | [✔️](https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/JeffVandrewJr/isso) - [DockerHub](https://hub.docker.com/r/jvandrew/isso) | -| lightninglabs/lightning-terminal | v0.6.1-alpha-path-prefix | [✔️](https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.6.1-alpha/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/lightninglabs/lightning-terminal) - [DockerHub](https://hub.docker.com/r/lightninglabs/lightning-terminal) | +| lightninglabs/lightning-terminal | v0.6.2-alpha-path-prefix | [✔️](https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.6.2-alpha/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/lightninglabs/lightning-terminal) - [DockerHub](https://hub.docker.com/r/lightninglabs/lightning-terminal) | | kukks/nnostr-relay | v0.0.7 | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.7/Relay/Dockerfile) | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.7/Relay/Dockerfile) | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.7/Relay/Dockerfile) | [Github](https://github.com/kukks/nnostr) - [DockerHub](https://hub.docker.com/r/kukks/nnostr-relay) | | sphinxlightning/sphinx-relay | v2.2.0 | [✔️](https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.0/Dockerfile) | ️❌ | [✔️](https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.0/Dockerfile) | [Github](https://github.com/stakwork/sphinx-relay) - [DockerHub](https://hub.docker.com/r/sphinxlightning/sphinx-relay) | | dennisreimann/tallycoin_connect | v1.7.0 | [✔️](https://raw.githubusercontent.com/dennisreimann/tallycoin_connect/v1.7.0/Dockerfile) | [✔️](https://raw.githubusercontent.com/dennisreimann/tallycoin_connect/v1.7.0/Dockerfile.arm32v7) | [✔️](https://raw.githubusercontent.com/dennisreimann/tallycoin_connect/v1.7.0/Dockerfile.arm64v8) | [Github](https://github.com/dennisreimann/tallycoin_connect) - [DockerHub](https://hub.docker.com/r/dennisreimann/tallycoin_connect) | diff --git a/contrib/build-all-images.sh b/contrib/build-all-images.sh index 958c201..0032ccb 100644 --- a/contrib/build-all-images.sh +++ b/contrib/build-all-images.sh @@ -717,7 +717,7 @@ DOCKERFILE="Dockerfile" echo "Building fireflyiii/core:latest" git clone https://dev.azure.com/Firefly-III/_git/MainImage core cd core -git checkout +git checkout cd "$(dirname $DOCKERFILE)" docker build -f "$DOCKERFILE" -t "fireflyiii/core:latest" . cd - && cd .. @@ -780,14 +780,14 @@ cd - && cd .. # Build lightning-terminal -# https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.6.1-alpha/Dockerfile +# https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.6.2-alpha/Dockerfile DOCKERFILE="Dockerfile" -echo "Building lightninglabs/lightning-terminal:v0.6.1-alpha-path-prefix" +echo "Building lightninglabs/lightning-terminal:v0.6.2-alpha-path-prefix" git clone https://github.com/lightninglabs/lightning-terminal lightning-terminal cd lightning-terminal -git checkout v0.6.1-alpha +git checkout v0.6.2-alpha cd "$(dirname $DOCKERFILE)" -docker build -f "$DOCKERFILE" -t "lightninglabs/lightning-terminal:v0.6.1-alpha-path-prefix" . +docker build -f "$DOCKERFILE" -t "lightninglabs/lightning-terminal:v0.6.2-alpha-path-prefix" . cd - && cd .. @@ -1135,5 +1135,3 @@ git checkout master cd "$(dirname $DOCKERFILE)" docker build -f "$DOCKERFILE" -t "romanornr/docker-viacoin:0.15.2" . cd - && cd .. - - diff --git a/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml b/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml index a592de1..398d4fe 100644 --- a/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml +++ b/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml @@ -4,12 +4,12 @@ services: environment: BTCPAY_EXTERNALSERVICES: "Lightning Terminal:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/lit/;" lnd_lit: - image: "lightninglabs/lightning-terminal:v0.6.1-alpha-path-prefix" + image: "lightninglabs/lightning-terminal:v0.6.2-alpha-path-prefix" restart: unless-stopped expose: - "8080" volumes: - - "lnd_lit_datadir:/data/lit" + - "lnd_lit_datadir:/root" - "lnd_bitcoin_datadir:/data/lnd:ro" links: - bitcoind diff --git a/helpers.sh b/helpers.sh index 79e1740..009e4c9 100755 --- a/helpers.sh +++ b/helpers.sh @@ -54,9 +54,9 @@ install_tooling() { btcpay_expand_variables() { BTCPAY_CRYPTOS="" for i in "$BTCPAYGEN_CRYPTO1" "$BTCPAYGEN_CRYPTO2" "$BTCPAYGEN_CRYPTO3" "$BTCPAYGEN_CRYPTO4" "$BTCPAYGEN_CRYPTO5" "$BTCPAYGEN_CRYPTO5" "$BTCPAYGEN_CRYPTO6" "$BTCPAYGEN_CRYPTO7" "$BTCPAYGEN_CRYPTO8" - do - if [ ! -z "$i" ]; then - if [ ! -z "$BTCPAY_CRYPTOS" ]; then + do + if [ ! -z "$i" ]; then + if [ ! -z "$BTCPAY_CRYPTOS" ]; then BTCPAY_CRYPTOS="$BTCPAY_CRYPTOS;" fi BTCPAY_CRYPTOS="$BTCPAY_CRYPTOS$i" @@ -108,7 +108,8 @@ TOR_RELAY_NICKNAME=$TOR_RELAY_NICKNAME TOR_RELAY_EMAIL=$TOR_RELAY_EMAIL EPS_XPUB=$EPS_XPUB LND_WTCLIENT_SWEEP_FEE=$LND_WTCLIENT_SWEEP_FEE -FIREFLY_HOST=$FIREFLY_HOST" > $BTCPAY_ENV_FILE +FIREFLY_HOST=$FIREFLY_HOST +LIT_PASSWD=$LIT_PASSWD" > $BTCPAY_ENV_FILE env | grep ^BWT_ >> $BTCPAY_ENV_FILE || true }