pyblock/umbrel/docker-compose.yml
GaltRanch ba5e9606db fix(umbrel): bundle bitcoin-cli and lncli for mode A/B without Lite fallback
PyBLOCK's mode A (Bitcoin + Lightning) and mode B (Bitcoin only) call
bitcoin-cli and lncli directly via subprocess. The Umbrel image did not
ship those binaries, so the startup validation in PyBlock.py:1898-1909
detected the empty CLI paths and silently redirected to Lite Mode against
public APIs — defeating the point of installing PyBLOCK on a node.

Per nmfretz's review on getumbrel/umbrel-apps#5258, this takes the
"bundle the binaries inside the PyBLOCK image" path (option 2):

- dockerfile: download bitcoin-cli (Bitcoin Core 28.1) and lncli (LND
  v0.20.1-beta, matching what Umbrel ships) for both linux/amd64 and
  linux/arm64. Verifies the Bitcoin Core SHA256SUMS. Real binaries land
  at /usr/local/bin/{bitcoin-cli,lncli}.bin.
- umbrel/{bitcoin-cli,lncli}-wrapper.sh: thin shell wrappers installed
  as /usr/local/bin/{bitcoin-cli,lncli} that exec the real binary with
  -rpcconnect/-rpcuser/-rpcpassword (or --rpcserver/--tlscertpath/
  --macaroonpath for lncli) injected from the BITCOIN_RPC_* / LND_*
  env vars Umbrel provides via APP_BITCOIN_* / APP_LIGHTNING_*. They
  fail loud if those env vars are missing.
- entrypoint.sh: default BITCOIN_CLI_PATH/LND_CLI_PATH to the wrapper
  locations when the relevant RPC host env vars are set and the wrapper
  is executable, so bclock.conf / blndconnect.conf get the right
  bitcoincli / ln paths automatically.
- umbrel/: bump image tag and app version to v4.0.2 with release notes.

Local smoke test on amd64:
  bitcoin-cli.bin --version -> Bitcoin Core RPC client version v28.1.0
  lncli.bin --version       -> lncli version 0.20.1-beta
  /usr/local/bin/bitcoin-cli (no env) -> fails with "BITCOIN_RPC_HOST must be set"
  /usr/local/bin/bitcoin-cli (env set) -> dispatches to the real binary

Image grows ~70MB (mostly the Go-built lncli).

Co-Authored-By: kulvex code <noreply@github.com>
2026-06-23 18:10:00 -03:00

32 lines
940 B
YAML

version: "3.7"
services:
app_proxy:
environment:
APP_HOST: pyblock_web_1
APP_PORT: 6969
web:
image: curly60e/pyblock:v4.0.2
restart: on-failure
stop_grace_period: 1m
user: "1000:1000"
volumes:
- ${APP_DATA_DIR}/data/config:/app/pyblock/pybitblock/config
- ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro
environment:
# Bitcoin Core RPC (injected by Umbrel)
BITCOIN_RPC_HOST: ${APP_BITCOIN_NODE_IP}
BITCOIN_RPC_PORT: ${APP_BITCOIN_RPC_PORT}
BITCOIN_RPC_USER: ${APP_BITCOIN_RPC_USER}
BITCOIN_RPC_PASS: ${APP_BITCOIN_RPC_PASS}
# LND (injected by Umbrel)
LND_HOST: ${APP_LIGHTNING_NODE_IP}
LND_GRPC_PORT: ${APP_LIGHTNING_NODE_GRPC_PORT}
LND_TLS_CERT_PATH: /lnd/tls.cert
LND_MACAROON_PATH: /lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/readonly.macaroon
# PyBLOCK auto-config
PYBLOCK_MODE: "A"
PYBLOCK_PORT: "6969"