Add HTTPS for Caravan

This commit is contained in:
Taylor Helsper 2020-06-16 22:48:25 -05:00
parent 7b21d6c275
commit 59d17748f8
3 changed files with 30 additions and 5 deletions

View File

@ -10,7 +10,7 @@ After=bitcoind.service
ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/wait_on_bitcoin.sh
WorkingDirectory=/opt/mynode/corsproxy
Environment="CORSPROXY_PORT=8334" "CORSPROXY_HOST=0.0.0.0" "CORSPROXY_TARGET=localhost:8332"
Environment="CORSPROXY_PORT=8334" "CORSPROXY_HOST=0.0.0.0" "CORSPROXY_TARGET=localhost:8332" "CORSPROXY_USE_HTTPS=true" "CORSPROXY_HTTPS_KEY=/home/bitcoin/.mynode/https/myNode.local.key" "CORSPROXY_HTTPS_CERT=/home/bitcoin/.mynode/https/myNode.local.crt"
ExecStart=/usr/bin/npm start
User=root

View File

@ -72,6 +72,7 @@ pip3 install python-bitcointx --no-cache-dir
pip3 install gnureadline --no-cache-dir
pip3 install lndmanage==0.10.0 --no-cache-dir # Install LND Manage (keep up to date with LND)
pip3 install docker-compose --no-cache-dir
pip3 install pipenv --no-cache-dir
# Install Docker
@ -271,14 +272,13 @@ if [ "$CURRENT" != "$CARAVAN_UPGRADE_URL" ]; then
cd caravan
sudo -u bitcoin npm install --only=production
sed -i 's/HTTPS=true/HTTPS=false/g' ./package.json || true
echo $CARAVAN_UPGRADE_URL > $CARAVAN_UPGRADE_URL_FILE
fi
cd ~
# Install cors proxy (my fork)
CORSPROXY_UPGRADE_URL=https://github.com/tehelsper/CORS-Proxy/archive/v1.6.0.tar.gz
CORSPROXY_UPGRADE_URL=https://github.com/tehelsper/CORS-Proxy/archive/v1.7.0.tar.gz
CORSPROXY_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.corsproxy_url
CURRENT=""
if [ -f $CORSPROXY_UPGRADE_URL_FILE ]; then
@ -423,6 +423,31 @@ if [ "$CURRENT" != "$BTCRPCEXPLORER_UPGRADE_URL" ]; then
fi
# Upgrade LNBits
# LNBITS_UPGRADE_URL=https://github.com/lnbits/lnbits/archive/raspiblitz.tar.gz
# LNBITS_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.lnbits_url
# CURRENT=""
# if [ -f $LNBITS_UPGRADE_URL_FILE ]; then
# CURRENT=$(cat $LNBITS_UPGRADE_URL_FILE)
# fi
# if [ "$CURRENT" != "$LNBITS_UPGRADE_URL" ]; then
# cd /opt/mynode
# rm -rf lnbits
# sudo -u bitcoin wget $LNBITS_UPGRADE_URL -O lnbits.tar.gz
# sudo -u bitcoin tar -xvf lnbits.tar.gz
# sudo -u bitcoin rm lnbits.tar.gz
# sudo -u bitcoin mv lnbits-* lnbits
# cd lnbits
# pipenv install lnd-grpc
# pipenv install --dev
# mkdir -p /home/bitcoin/.mynode/
# chown -R bitcoin:bitcoin /home/bitcoin/.mynode/
# echo $LNBITS_UPGRADE_URL > $LNBITS_UPGRADE_URL_FILE
# fi
# Install LND Connect
LNDCONNECTARCH="lndconnect-linux-armv7"
if [ $IS_X86 = 1 ]; then

View File

@ -172,6 +172,7 @@ pip3 install python-bitcointx
pip3 install gnureadline
pip3 install lndmanage==0.10.0 # Install LND Manage (keep up to date with LND)
pip3 install docker-compose
pip3 install pipenv
# Install Rust
@ -389,14 +390,13 @@ if [ "$CURRENT" != "$CARAVAN_UPGRADE_URL" ]; then
cd caravan
sudo -u bitcoin npm install --only=production
sed -i 's/HTTPS=true/HTTPS=false/g' ./package.json || true
echo $CARAVAN_UPGRADE_URL > $CARAVAN_UPGRADE_URL_FILE
fi
cd ~
# Install cors proxy (my fork)
CORSPROXY_UPGRADE_URL=https://github.com/tehelsper/CORS-Proxy/archive/v1.6.0.tar.gz
CORSPROXY_UPGRADE_URL=https://github.com/tehelsper/CORS-Proxy/archive/v1.7.0.tar.gz
CORSPROXY_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.corsproxy_url
CURRENT=""
if [ -f $CORSPROXY_UPGRADE_URL ]; then