Browse Source

Add btc-rpc-explorer app (#334)

app-name
Luke Childs 4 years ago
committed by GitHub
parent
commit
e9ceed5c8e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      apps/btc-rpc-explorer/docker-compose.yml
  2. 4
      scripts/configure
  3. 2
      templates/.env-sample
  4. 4
      templates/torrc-sample

41
apps/btc-rpc-explorer/docker-compose.yml

@ -0,0 +1,41 @@
version: "3.7"
x-logging:
&default-logging
driver: journald
options:
tag: "umbrel-app {{.Name}}"
services:
web:
image: getumbrel/btc-rpc-explorer:v2.0.2@sha256:f8ba8b97e550f65e5bc935d7516cce7172910e9009f3154a434c7baf55e82a2b
logging: *default-logging
restart: on-failure
stop_grace_period: 5m
ports:
- "$APP_BTC_RPC_EXPLORER_PORT:$APP_BTC_RPC_EXPLORER_PORT"
environment:
# Docker requirements
BTCEXP_HOST: 0.0.0.0
# Bitcoin Core
BTCEXP_BITCOIND_HOST: $BITCOIN_IP
BTCEXP_BITCOIND_PORT: $BITCOIN_RPC_PORT
BTCEXP_BITCOIND_USER: $BITCOIN_RPC_USER
BTCEXP_BITCOIND_PASS: $BITCOIN_RPC_PASS
# Electrum
BTCEXP_ADDRESS_API: electrumx
BTCEXP_ELECTRUMX_SERVERS: "tcp://$ELECTRUM_IP:$ELECTRUM_PORT"
# Log level
DEBUG: "btcexp:*,electrumClient"
# Performance
BTCEXP_SLOW_DEVICE_MODE: "true"
BTCEXP_NO_INMEMORY_RPC_CACHE: "true"
# Privacy
BTCEXP_PRIVACY_MODE: "true"
BTCEXP_NO_RATES: "true"
# Disable RPC
BTCEXP_RPC_ALLOWALL: "false"
BTCEXP_BASIC_AUTH_PASSWORD: ""
networks:
default:
ipv4_address: $APP_BTC_RPC_EXPLORER_IP

4
scripts/configure

@ -121,6 +121,8 @@ TOR_PROXY_IP="10.0.0.11"
TOR_PROXY_PORT="9050"
# Apps
APP_BTC_RPC_EXPLORER_IP="10.0.1.0"
APP_BTC_RPC_EXPLORER_PORT="3002"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -241,6 +243,8 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<tor-proxy-port>/${TOR_PROXY_PORT}/g" "${template}"
# Apps
sed -i "s/<app-btc-rpc-explorer-ip>/${APP_BTC_RPC_EXPLORER_IP}/g" "${template}"
sed -i "s/<app-btc-rpc-explorer-port>/${APP_BTC_RPC_EXPLORER_PORT}/g" "${template}"
done

2
templates/.env-sample

@ -25,3 +25,5 @@ TOR_HASHED_PASSWORD=<password>
DOCKER_BINARY=<path>
# Apps
APP_BTC_RPC_EXPLORER_IP=<app-btc-rpc-explorer-ip>
APP_BTC_RPC_EXPLORER_PORT=<app-btc-rpc-explorer-port>

4
templates/torrc-sample

@ -30,4 +30,8 @@ HiddenServicePort <lnd-grpc-port> <lnd-ip>:<lnd-grpc-port>
# Apps
# btc-rpc-explorer Hidden Service
HiddenServiceDir /var/lib/tor/app-btc-rpc-explorer
HiddenServicePort 80 <app-btc-rpc-explorer-ip>:<app-btc-rpc-explorer-port>
HashedControlPassword <password>

Loading…
Cancel
Save