diff --git a/build/tor/Dockerfile b/build/tor/Dockerfile deleted file mode 100644 index 14077db..0000000 --- a/build/tor/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM alpine:3.11 - -RUN apk add --no-cache tor - -VOLUME /etc/tor/ -VOLUME /var/lib/tor/ - -EXPOSE 9050 9051 29050 29051 - -ENTRYPOINT ["tor"] diff --git a/build/volume-permissions/Dockerfile b/build/volume-permissions/Dockerfile deleted file mode 100644 index 77cc99d..0000000 --- a/build/volume-permissions/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -ARG IMG -ARG VER - -FROM ${IMG}:${VER} - -ARG ID=1000 -ARG DIR=/data/ - -RUN addgroup --gid ${ID} lncm - -RUN adduser --uid ${ID} \ - --home ${DIR} \ - --disabled-password \ - --gecos "" \ - --ingroup lncm \ - lncm - -USER lncm - -VOLUME ${DIR} - diff --git a/configure-box.sh b/configure-box.sh index 953a21c..9990822 100755 --- a/configure-box.sh +++ b/configure-box.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF @@ -70,12 +70,17 @@ if [ -z $TESTNET ] && [ -z $REGTEST ]; then echo "Setting mainnet RPC port in docker-compose" sed -i 's/RPCPORT/18443/g; ' docker-compose.yml fi + +echo "Pulling Docker images" +docker-compose pull + echo "Adding tor password" -SAVE_PASSWORD=`tor --hash-password "${RPCPASS}"` +SAVE_PASSWORD=`docker run -it getumbrel/tor:v0.4.1.9 --quiet --hash-password "${RPCPASS}"` echo "HashedControlPassword ${SAVE_PASSWORD}" >> tor/torrc -echo "Configuring bitcoind" + +echo "Adding Tor password to bitcoind" sed -i "s/torpassword=umbrelftw/torpassword=${RPCPASS}/g;" bitcoin/bitcoin.conf -echo "Configuring LND" +echo "Adding Tor password to LND" sed -i "s/tor.password=umbrelftw/tor.password=${RPCPASS}/g; " lnd/lnd.conf rm configure-box.sh diff --git a/docker-compose.yml b/docker-compose.yml index be3e9a9..9a8c9ad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ x-utility: &default-utility services: tor: - build: ${PWD}/build/tor/ + image: getumbrel/tor:v0.4.1.9 restart: on-failure logging: *default-logging volumes: diff --git a/install-box.sh b/install-box.sh index 62aa029..16be67b 100644 --- a/install-box.sh +++ b/install-box.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -e # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF diff --git a/tor/torrc b/tor/torrc index 9d75239..3c12312 100644 --- a/tor/torrc +++ b/tor/torrc @@ -3,4 +3,4 @@ SocksPort 10.11.5.1:29050 ControlPort 10.11.5.1:29051 # Tor Passwords -HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 +HashedControlPassword 16:50A873DF18C00F4A6048BF1CEF7E7AA66478F0B5134DA4369D80657F26 \ No newline at end of file