Browse Source

Merge branch 'feat_mydojo_bitcoind_0_21_0' into 'develop'

upgrade bitcoin container with bitcoin core 0.21.0

See merge request dojo/samourai-dojo!182
use-env-var-docker
kenshin-samourai 4 years ago
parent
commit
1e82af8297
  1. 2
      docker/my-dojo/.env
  2. 8
      docker/my-dojo/bitcoin/Dockerfile
  3. 4
      docker/my-dojo/bitcoin/restart.sh
  4. 6
      docker/my-dojo/dojo.sh
  5. 13
      docker/my-dojo/install/upgrade-scripts.sh
  6. 4
      docker/my-dojo/tor/restart.sh

2
docker/my-dojo/.env

@ -12,7 +12,7 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1
DOJO_VERSION_TAG=1.9.0
DOJO_DB_VERSION_TAG=1.2.0
DOJO_BITCOIND_VERSION_TAG=1.10.0
DOJO_BITCOIND_VERSION_TAG=1.11.0
DOJO_NODEJS_VERSION_TAG=1.9.0
DOJO_NGINX_VERSION_TAG=1.5.0
DOJO_TOR_VERSION_TAG=1.6.0

8
docker/my-dojo/bitcoin/Dockerfile

@ -5,10 +5,10 @@ FROM debian:buster
# INSTALL BITCOIN
#################################################################
ENV BITCOIN_HOME /home/bitcoin
ENV BITCOIN_VERSION 0.20.1
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-0.20.1/bitcoin-0.20.1-x86_64-linux-gnu.tar.gz
ENV BITCOIN_SHA256 376194f06596ecfa40331167c39bc70c355f960280bd2a645fdbf18f66527397
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-0.20.1/SHA256SUMS.asc
ENV BITCOIN_VERSION 0.21.0
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-0.21.0/bitcoin-0.21.0-x86_64-linux-gnu.tar.gz
ENV BITCOIN_SHA256 da7766775e3f9c98d7a9145429f2be8297c2672fe5b118fd3dc2411fb48e0032
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-0.21.0/SHA256SUMS.asc
ENV BITCOIN_PGP_KS_URI hkp://keyserver.ubuntu.com:80
ENV BITCOIN_PGP_KEY 01EA5486DE18A882D4C2684590C8019E36C2E964

4
docker/my-dojo/bitcoin/restart.sh

@ -16,7 +16,7 @@ bitcoind_options=(
-minrelaytxfee=$BITCOIND_MIN_RELAY_TX_FEE
-port=8333
-proxy=172.28.1.4:9050
-rpcallowip=::/0
-rpcallowip=0.0.0.0/0
-rpcbind=172.28.1.5
-rpcpassword=$BITCOIND_RPC_PASSWORD
-rpcport=28256
@ -32,7 +32,7 @@ bitcoind_options=(
if [ "$BITCOIND_LISTEN_MODE" == "on" ]; then
bitcoind_options+=(-listen=1)
bitcoind_options+=(-bind=172.28.1.5)
bitcoind_options+=(-externalip=$(cat /var/lib/tor/hsv2bitcoind/hostname))
bitcoind_options+=(-externalip=$(cat /var/lib/tor/hsv3bitcoind/hostname))
fi
if [ "$BITCOIND_RPC_EXTERNAL" == "on" ]; then

6
docker/my-dojo/dojo.sh

@ -85,7 +85,7 @@ stop() {
# Renewal of bitcoind onion address
if [ "$BITCOIND_LISTEN_MODE" == "on" ]; then
if [ "$BITCOIND_EPHEMERAL_HS" = "on" ]; then
$( docker exec -it tor rm -rf /var/lib/tor/hsv2bitcoind ) &> /dev/null
$( docker exec -it tor rm -rf /var/lib/tor/hsv3bitcoind ) &> /dev/null
fi
fi
# Stop the bitcoin daemon
@ -374,8 +374,8 @@ onion() {
if [ "$BITCOIND_INSTALL" == "on" ]; then
if [ "$BITCOIND_LISTEN_MODE" == "on" ]; then
V2_ADDR_BTCD=$( docker exec -it tor cat /var/lib/tor/hsv2bitcoind/hostname )
echo "Your local bitcoind (do not share) = $V2_ADDR_BTCD"
V3_ADDR_BTCD=$( docker exec -it tor cat /var/lib/tor/hsv3bitcoind/hostname )
echo "Your local bitcoind (do not share) = $V3_ADDR_BTCD"
echo " "
fi
fi

13
docker/my-dojo/install/upgrade-scripts.sh

@ -69,7 +69,7 @@ update_config_files() {
update_config_file ./conf/docker-whirlpool.conf ./conf/docker-whirlpool.conf.tpl
echo "Initialized docker-whirlpool.conf"
# Initialize config files for nginx and the maintenance tool
# Initialize config files for nginx and the maintenance tool
if [ "$EXPLORER_INSTALL" == "on" ]; then
cp ./nginx/explorer.conf ./nginx/dojo-explorer.conf
else
@ -106,7 +106,7 @@ update_config_file() {
cp -p $1 "$1.save"
cp -p $2 $1
while IFS='=' read -r key val ; do
while IFS='=' read -r key val ; do
if [[ $OSTYPE == darwin* ]]; then
sed -i "" "s~$key=.*~$key=$val~g" "$1"
else
@ -179,11 +179,18 @@ cleanup() {
if [ -f ./bitcoin/bitcoin.conf ]; then
rm ./bitcoin/bitcoin.conf
fi
}
# Post start clean-up
post_start_cleanup() {
#################
# Clean-up v1.9.0
#################
# Remove /var/lib/tor/hsv2bitcoind from tor volume
docker exec -it tor rm -rf /var/lib/tor/hsv2bitcoind
#################
# Clean-up v1.6.0
#################

4
docker/my-dojo/tor/restart.sh

@ -23,8 +23,8 @@ tor_options=(
if [ "$BITCOIND_INSTALL" == "on" ]; then
if [ "$BITCOIND_LISTEN_MODE" == "on" ]; then
tor_options+=(--HiddenServiceDir /var/lib/tor/hsv2bitcoind)
tor_options+=(--HiddenServiceVersion 2)
tor_options+=(--HiddenServiceDir /var/lib/tor/hsv3bitcoind)
tor_options+=(--HiddenServiceVersion 3)
tor_options+=(--HiddenServicePort "8333 172.28.1.5:8333")
tor_options+=(--HiddenServiceDirGroupReadable 1)
fi

Loading…
Cancel
Save