Files

99 lines
3.9 KiB
YAML

version: "3.7"
services:
app_proxy:
environment:
APP_HOST: bitcoin-regtest-dashboard_dashboard_1
APP_PORT: 3000
# The dashboard UI stays behind umbrelOS authentication. The HTTP API is
# exempt so scripts, test suites and agents running on other machines can
# reach it without umbrelOS credentials, which is the point of the API.
# Both rules are needed: "/api/*" does not match the bare /api index.
# Set API_TOKEN on the dashboard service below to require a bearer token.
PROXY_AUTH_WHITELIST: "/api,/api/*"
# Bitcoin Core in regtest mode (self-contained, no dependencies)
bitcoin:
image: ghcr.io/getumbrel/docker-bitcoind:v31.1@sha256:e0a94f8390f4fee796faba306719860a1ba61e8fa841416bca26fd4e1e94cb8c
user: "1000:1000"
restart: on-failure
entrypoint: ["/bin/sh", "-c"]
command:
- |
rm -f /data/.bitcoin/regtest/.ready
bitcoind -regtest \
-server=1 \
-rpcbind=0.0.0.0 \
-rpcallowip=0.0.0.0/0 \
-rpcport=18443 \
-txindex=1 \
-fallbackfee=0.00001 \
-disablewallet=0 \
-zmqpubrawblock=tcp://0.0.0.0:28332 \
-zmqpubrawtx=tcp://0.0.0.0:28333 &
BITCOIND_PID=$$!
while [ ! -f /data/.bitcoin/regtest/.cookie ]; do sleep 1; done
chmod 755 /data/.bitcoin/regtest
chmod 644 /data/.bitcoin/regtest/.cookie
chmod 644 /data/.bitcoin/regtest/debug.log 2>/dev/null || true
sleep 2
bitcoin-cli -regtest -rpccookiefile=/data/.bitcoin/regtest/.cookie createwallet "regtest_wallet" 2>/dev/null || \
bitcoin-cli -regtest -rpccookiefile=/data/.bitcoin/regtest/.cookie loadwallet "regtest_wallet" 2>/dev/null || true
bitcoin-cli -regtest -rpccookiefile=/data/.bitcoin/regtest/.cookie -rpcwallet=regtest_wallet -generate 1 >/dev/null 2>&1 || true
touch /data/.bitcoin/regtest/.ready
while kill -0 $$BITCOIND_PID 2>/dev/null; do
chmod 755 /data/.bitcoin/regtest 2>/dev/null
chmod 644 /data/.bitcoin/regtest/.cookie 2>/dev/null
chmod 644 /data/.bitcoin/regtest/debug.log 2>/dev/null
sleep 5
done &
wait $$BITCOIND_PID
volumes:
- ${APP_DATA_DIR}/data/bitcoin:/data/.bitcoin
healthcheck:
test: ["CMD-SHELL", "test -f /data/.bitcoin/regtest/.ready && chmod 644 /data/.bitcoin/regtest/.cookie && bitcoin-cli -regtest -rpccookiefile=/data/.bitcoin/regtest/.cookie getblockchaininfo"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
# Electrs - Electrum Server implementation
electrs:
image: getumbrel/electrs:v0.11.0@sha256:0a2c6f573abfd8d724651c6ba1c1f3a9c740219c1cf0f4468043c3342170d8a5
user: "1000:1000"
restart: on-failure
ports:
- "60401:50001"
environment:
ELECTRS_ELECTRUM_RPC_ADDR: "0.0.0.0:50001"
ELECTRS_DAEMON_RPC_ADDR: "bitcoin-regtest-dashboard_bitcoin_1:18443"
ELECTRS_DAEMON_P2P_ADDR: "bitcoin-regtest-dashboard_bitcoin_1:18444"
ELECTRS_LOG_FILTERS: "INFO"
ELECTRS_NETWORK: "regtest"
volumes:
- ${APP_DATA_DIR}/data/electrs:/data
- ${APP_DATA_DIR}/data/bitcoin:/data/.bitcoin:ro
depends_on:
bitcoin:
condition: service_healthy
# Bitcoin Regtest Dashboard
dashboard:
image: coreylphillips/bitcoin-regtest-dashboard:v1.1.0@sha256:41835f0f891ecaf7a581f89adac2c6c305669b30618973fab5a7aac251e0d677
user: "1000:1000"
restart: on-failure
environment:
PORT: 3000
BITCOIN_RPC_HOST: bitcoin-regtest-dashboard_bitcoin_1
BITCOIN_RPC_PORT: 18443
BITCOIN_COOKIE_FILE: /bitcoin/.bitcoin/regtest/.cookie
ELECTRS_HOST: bitcoin-regtest-dashboard_electrs_1
ELECTRS_PORT: 50001
ELECTRS_EXTERNAL_PORT: 60401
BITCOIN_DEBUG_LOG: /bitcoin/.bitcoin/regtest/debug.log
volumes:
- ${APP_DATA_DIR}/data/bitcoin:/bitcoin/.bitcoin:ro
depends_on:
bitcoin:
condition: service_healthy