Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add btc-rpc-explorer app #334

Merged
merged 2 commits into from Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 41 additions & 0 deletions 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 changes: 4 additions & 0 deletions scripts/configure
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down
2 changes: 2 additions & 0 deletions templates/.env-sample
Expand Up @@ -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 changes: 4 additions & 0 deletions templates/torrc-sample
Expand Up @@ -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>