diff --git a/mempool/docker-compose.yml b/mempool/docker-compose.yml index 9df65cb67..07424c992 100644 --- a/mempool/docker-compose.yml +++ b/mempool/docker-compose.yml @@ -18,7 +18,7 @@ services: BACKEND_MAINNET_HTTP_HOST: $APP_MEMPOOL_API_IP NGINX_PORT: $APP_MEMPOOL_PORT NGINX_HOSTNAME: $APP_MEMPOOL_API_IP - LIGHTNING_DETECTED_PORT: $APP_LIGHTNING_NODE_PORT + LIGHTNING_DETECTED_PORT: $APP_MEMPOOL_LIGHTNING_NODE_PORT networks: default: ipv4_address: $APP_MEMPOOL_IP @@ -56,7 +56,7 @@ services: LIGHTNING_GRAPH_REFRESH_INTERVAL: 3600 LND_TLS_CERT_PATH: "/lnd/tls.cert" LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/readonly.macaroon" - LND_REST_API_URL: "https://$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT" + LND_REST_API_URL: "https://$APP_MEMPOOL_LIGHTNING_NODE_IP:$APP_MEMPOOL_LIGHTNING_NODE_REST_PORT" LND_TIMEOUT: 120000 NODE_OPTIONS: "--max-old-space-size=2048" networks: diff --git a/mempool/exports.sh b/mempool/exports.sh index cd66ac2b4..3f182e7bb 100644 --- a/mempool/exports.sh +++ b/mempool/exports.sh @@ -4,4 +4,14 @@ export APP_MEMPOOL_API_IP="10.21.21.27" export APP_MEMPOOL_DB_IP="10.21.21.28" hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}/hostname" -export APP_MEMPOOL_HIDDEN_SERVICE="$(cat "${hidden_service_file}" 2>/dev/null || echo "")" \ No newline at end of file +export APP_MEMPOOL_HIDDEN_SERVICE="$(cat "${hidden_service_file}" 2>/dev/null || echo "")" + +# Check if Lightning Node app is installed and export required variables if so +# The Lightning Node app is optional and not listed in the `required` field of the umbrel-app.yml file, so we need to do this for compatibility with umbrelOS >=1.3 where only exports of required apps are sourced. +installed_apps=$("${UMBREL_ROOT}/scripts/app" ls-installed) + +if echo "$installed_apps" | grep --quiet 'lightning'; then + export APP_MEMPOOL_LIGHTNING_NODE_PORT="9735" + export APP_MEMPOOL_LIGHTNING_NODE_IP="10.21.21.9" + export APP_MEMPOOL_LIGHTNING_NODE_REST_PORT="8080" +fi \ No newline at end of file