diff --git a/apps/suredbits-wallet/data/wallet/.gitkeep b/apps/suredbits-wallet/data/wallet/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/apps/suredbits-wallet/docker-compose.yml b/apps/suredbits-wallet/docker-compose.yml new file mode 100644 index 0000000000..6f281b7783 --- /dev/null +++ b/apps/suredbits-wallet/docker-compose.yml @@ -0,0 +1,40 @@ +version: "3.7" + +services: + web: + image: bitcoinscala/wallet-server-ui:0.0.1-f1486000-SNAPSHOT + user: "1000:1000" + restart: on-failure + stop_grace_period: 1m + environment: + WALLET_SERVER_API_URL: "http://${APP_SUREDBITS_WALLET_SERVER_IP}:9999/" + TOR_PROXY: socks5://${TOR_PROXY_IP}:${TOR_PROXY_PORT} + ports: + - "${APP_SUREDBITS_WALLET_PORT}:3002" + networks: + default: + ipv4_address: $APP_SUREDBITS_WALLET_IP + depends_on: + - walletserver + walletserver: + image: bitcoinscala/bitcoin-s-server:1.8.0-60-6e7af37c-SNAPSHOT + user: "1000:1000" + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/wallet:/home/bitcoin-s/.bitcoin-s + environment: + BITCOIN_S_NETWORK: $BITCOIN_NETWORK + BITCOIN_S_KEYMANAGER_ENTROPY: $APP_SEED + BITCOIN_S_PROXY_ENABLED: "false" + BITCOIN_S_TOR_ENABLED: "false" + BITCOIN_S_TOR_PROVIDED: "true" + BITCOIN_S_DLCNODE_PROXY_ENABLED: "true" + BITCOIN_S_DLCNODE_PROXY_SOCKS5: "${TOR_PROXY_IP}:${TOR_PROXY_PORT}" + BITCOIN_S_DLCNODE_EXTERNAL_IP: $SUREDBITS_WALLET_P2P_HIDDEN_SERVICE + BITCOIN_S_BITCOIND_HOST: $BITCOIN_IP + BITCOIN_S_BITCOIND_PORT: $BITCOIN_RPC_PORT + BITCOIN_S_BITCOIND_USER: $BITCOIN_RPC_USER + BITCOIN_S_BITCOIND_PASSWORD: $BITCOIN_RPC_PASS + networks: + default: + ipv4_address: $APP_SUREDBITS_WALLET_SERVER_IP diff --git a/scripts/app b/scripts/app index c23cd51a04..4da9a3ad3f 100755 --- a/scripts/app +++ b/scripts/app @@ -124,6 +124,7 @@ compose() { local dojo_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-dojo/hostname" local whirlpool_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-whirlpool/hostname" local squeaknode_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname" + local suredbits_wallet_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname" export SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE="$(cat "${dojo_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" export SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE="$(cat "${whirlpool_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" export SAMOURAI_SERVER_NODE_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_API_KEY") @@ -131,6 +132,7 @@ compose() { export SAMOURAI_SERVER_NODE_JWT_SECRET=$(derive_entropy "env-${app_entropy_identifier}-NODE_JWT_SECRET") export SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY") export SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" + export SUREDBITS_WALLET_P2P_HIDDEN_SERVICE="$(cat "${suredbits_wallet_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" docker-compose \ --env-file "${env_file}" \ diff --git a/scripts/configure b/scripts/configure index 6ee5e6ebf8..92c548370a 100755 --- a/scripts/configure +++ b/scripts/configure @@ -216,6 +216,10 @@ APP_TALLYCOIN_CONNECT_PORT="8123" APP_SYNCTHING_IP="10.21.21.61" APP_SYNCTHING_PORT="8384" APP_SYNCTHING_SYNC_PORT="22000" +APP_SUREDBITS_WALLET_IP="10.21.21.100" +APP_SUREDBITS_WALLET_SERVER_IP="10.21.21.101" +APP_SUREDBITS_WALLET_PORT="3020" +APP_SUREDBITS_WALLET_P2P_PORT="2862" # Generate RPC credentials if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then @@ -429,6 +433,10 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " sed -i "s//${APP_SYNCTHING_IP}/g" "${template}" sed -i "s//${APP_SYNCTHING_PORT}/g" "${template}" sed -i "s//${APP_SYNCTHING_SYNC_PORT}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_IP}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_SERVER_IP}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_PORT}/g" "${template}" + sed -i "s//${APP_SUREDBITS_WALLET_P2P_PORT}/g" "${template}" done ########################################################## diff --git a/templates/.env-sample b/templates/.env-sample index a5cb2a0035..3039d5b5a5 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -110,3 +110,7 @@ APP_TALLYCOIN_CONNECT_PORT= APP_SYNCTHING_IP= APP_SYNCTHING_PORT= APP_SYNCTHING_SYNC_PORT= +APP_SUREDBITS_WALLET_IP= +APP_SUREDBITS_WALLET_SERVER_IP= +APP_SUREDBITS_WALLET_PORT= +APP_SUREDBITS_WALLET_P2P_PORT= diff --git a/templates/torrc-apps-3-sample b/templates/torrc-apps-3-sample index ea36a32a88..87d7f91137 100644 --- a/templates/torrc-apps-3-sample +++ b/templates/torrc-apps-3-sample @@ -44,3 +44,11 @@ HiddenServicePort 80 : # syncthing Hidden Service HiddenServiceDir /var/lib/tor/app-syncthing HiddenServicePort 80 : + +# suredbits-wallet Hidden Service +HiddenServiceDir /var/lib/tor/app-suredbits-wallet +HiddenServicePort 80 : + +# suredbits-wallet p2p Hidden Service +HiddenServiceDir /var/lib/tor/app-suredbits-wallet-p2p +HiddenServicePort :