Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
40 changes: 40 additions & 0 deletions apps/suredbits-wallet/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions scripts/app
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,15 @@ 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")
export SAMOURAI_SERVER_NODE_ADMIN_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_ADMIN_KEY")
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}" \
Expand Down
8 changes: 8 additions & 0 deletions scripts/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -429,6 +433,10 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-syncthing-ip>/${APP_SYNCTHING_IP}/g" "${template}"
sed -i "s/<app-syncthing-port>/${APP_SYNCTHING_PORT}/g" "${template}"
sed -i "s/<app-syncthing-sync-port>/${APP_SYNCTHING_SYNC_PORT}/g" "${template}"
sed -i "s/<app-suredbits-wallet-ip>/${APP_SUREDBITS_WALLET_IP}/g" "${template}"
sed -i "s/<app-suredbits-wallet-server-ip>/${APP_SUREDBITS_WALLET_SERVER_IP}/g" "${template}"
sed -i "s/<app-suredbits-wallet-port>/${APP_SUREDBITS_WALLET_PORT}/g" "${template}"
sed -i "s/<app-suredbits-wallet-p2p-port>/${APP_SUREDBITS_WALLET_P2P_PORT}/g" "${template}"
done

##########################################################
Expand Down
4 changes: 4 additions & 0 deletions templates/.env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ APP_TALLYCOIN_CONNECT_PORT=<app-tallycoin-connect-port>
APP_SYNCTHING_IP=<app-syncthing-ip>
APP_SYNCTHING_PORT=<app-syncthing-port>
APP_SYNCTHING_SYNC_PORT=<app-syncthing-sync-port>
APP_SUREDBITS_WALLET_IP=<app-suredbits-wallet-ip>
APP_SUREDBITS_WALLET_SERVER_IP=<app-suredbits-wallet-server-ip>
APP_SUREDBITS_WALLET_PORT=<app-suredbits-wallet-port>
APP_SUREDBITS_WALLET_P2P_PORT=<app-suredbits-wallet-p2p-port>
8 changes: 8 additions & 0 deletions templates/torrc-apps-3-sample
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ HiddenServicePort 80 <app-tallycoin-connect-ip>:<app-tallycoin-connect-port>
# syncthing Hidden Service
HiddenServiceDir /var/lib/tor/app-syncthing
HiddenServicePort 80 <app-syncthing-ip>:<app-syncthing-port>

# suredbits-wallet Hidden Service
HiddenServiceDir /var/lib/tor/app-suredbits-wallet
HiddenServicePort 80 <app-suredbits-wallet-ip>:<app-suredbits-wallet-port>

# suredbits-wallet p2p Hidden Service
HiddenServiceDir /var/lib/tor/app-suredbits-wallet-p2p
HiddenServicePort <app-suredbits-wallet-p2p-port> <app-suredbits-wallet-server-ip>:<app-suredbits-wallet-p2p-port>