Browse Source

Fix for electrs bitcoin network env var

main
Luke Childs 3 years ago
parent
commit
0346a20846
  1. 8
      bitcoin/exports.sh
  2. 2
      electrs/docker-compose.yml

8
bitcoin/exports.sh

@ -82,4 +82,10 @@ export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}")
rpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rpc/hostname"
p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname"
export APP_BITCOIN_RPC_HIDDEN_SERVICE="$(cat "${rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
# electrs compatible network param
export APP_BITCOIN_NETWORK_ELECTRS=$APP_BITCOIN_NETWORK
if [[ "${APP_BITCOIN_NETWORK_ELECTRS}" = "mainnet" ]]; then
APP_BITCOIN_NETWORK_ELECTRS="bitcoin"
fi

2
electrs/docker-compose.yml

@ -27,7 +27,7 @@ services:
restart: always
environment:
ELECTRS_LOG_FILTERS: "INFO"
ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK}"
ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK_ELECTRS}"
ELECTRS_DAEMON_RPC_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}"
ELECTRS_DAEMON_P2P_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_P2P_PORT}"
ELECTRS_ELECTRUM_RPC_ADDR: "0.0.0.0:${APP_ELECTRS_NODE_PORT}"

Loading…
Cancel
Save