bitcoin: production-ready mainnet bitcoind for DRPC serving
Switch to bitcoin/bitcoin:31.0 with txindex and tuned RPC flags, drop the esplora indexer sidecar, and add bitcoin-protocol health probes so fleet status and wait-for-online work for bitcoin-family nodes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
||||
|
||||
services:
|
||||
bitcoin-mainnet:
|
||||
image: ${BITCOIN_BITCOIND_IMAGE:-lncm/bitcoind}:${BITCOIN_MAINNET_BITCOIND_VERSION:-v28.0}
|
||||
image: ${BITCOIN_BITCOIND_IMAGE:-bitcoin/bitcoin}:${BITCOIN_MAINNET_BITCOIND_VERSION:-31.0}
|
||||
sysctls:
|
||||
# TCP Performance
|
||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||
@@ -57,14 +57,20 @@ services:
|
||||
entrypoint: [bitcoind]
|
||||
command:
|
||||
- -datadir=/data
|
||||
- -dbcache=4096
|
||||
- -disablewallet=1
|
||||
- -externalip=${IP}
|
||||
- -maxconnections=64
|
||||
- -port=12518
|
||||
- -printtoconsole
|
||||
- -rpcallowip=::/0
|
||||
- -rpcauth=username:0b6623bdebb516ced10631668833e42a$$c478b38890678c51b9f013174a20addb317c2046b68c05e0250ff86e31a505f7
|
||||
- -rpcbind=0.0.0.0
|
||||
- -rpcport=8545
|
||||
- -rpcthreads=16
|
||||
- -rpcworkqueue=512
|
||||
- -server
|
||||
- -txindex=1
|
||||
- -zmqpubhashblock=tcp://0.0.0.0:28332
|
||||
- -zmqpubhashtx=tcp://0.0.0.0:28333
|
||||
- -zmqpubrawblock=tcp://0.0.0.0:28334
|
||||
@@ -117,40 +123,8 @@ services:
|
||||
- ${NO_SSL:+traefik.http.routers.bitcoin-mainnet-bitcoind-full-rawtx.rule=PathPrefix(`/bitcoin-mainnet/rawtx`)}
|
||||
- traefik.http.routers.bitcoin-mainnet-bitcoind-full-rawtx.middlewares=bitcoin-mainnet-bitcoind-full-stripprefix, ipallowlist
|
||||
|
||||
bitcoin-mainnet-indexer:
|
||||
image: blockstream/esplora
|
||||
expose:
|
||||
- 3000 # HTTP
|
||||
- 50001 # RPC (electrum)
|
||||
environment:
|
||||
- ELECTRS_DAEMON_P2P_ADDR=bitcoin-mainnet:12518
|
||||
- ELECTRS_DAEMON_RPC_ADDR=bitcoin-mainnet:8545
|
||||
- ELECTRS_DB_DIR=/data/electrs
|
||||
- ELECTRS_ELECTRUM_RPC_ADDR=0.0.0.0:50001
|
||||
- ELECTRS_HTTP_ADDR=0.0.0.0:3000
|
||||
- ELECTRS_JSONRPC_IMPORT=true
|
||||
- ELECTRS_NETWORK=bitcoin
|
||||
- ELECTRS_RPC_PASS=password
|
||||
- ELECTRS_RPC_USER=username
|
||||
networks:
|
||||
- chains
|
||||
volumes:
|
||||
- ${BITCOIN_MAINNET_BITCOIND_FULL__ESPLORA_DATA:-bitcoin-mainnet-bitcoind-full_esplora}:/data
|
||||
logging: *logging-defaults
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.service=bitcoin-mainnet-bitcoind-full-esplora
|
||||
- traefik.http.middlewares.bitcoin-mainnet-bitcoind-full-esplora-stripprefix.stripprefix.prefixes=/bitcoin-mainnet
|
||||
- traefik.http.services.bitcoin-mainnet-bitcoind-full-esplora.loadbalancer.server.port=3000
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.entrypoints=websecure}
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.tls.certresolver=myresolver}
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.rule=Host(`$DOMAIN`) && (PathPrefix(`bitcoin-mainnet/address`) || PathPrefix(`bitcoin-mainnet/tx`) || PathPrefix(`bitcoin-mainnet/block`) || PathPrefix(`bitcoin-mainnet/blocks`) || PathPrefix(`bitcoin-mainnet/mempool`) || PathPrefix(`bitcoin-mainnet/fee-estimates`) || PathPrefix(`bitcoin-mainnet/scripthash`) || PathPrefix(`bitcoin-mainnet/asset`))}
|
||||
- ${NO_SSL:+traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.rule=PathPrefix(`bitcoin-mainnet/address`) || PathPrefix(`bitcoin-mainnet/tx`) || PathPrefix(`bitcoin-mainnet/block`) || PathPrefix(`bitcoin-mainnet/blocks`) || PathPrefix(`bitcoin-mainnet/mempool`) || PathPrefix(`bitcoin-mainnet/fee-estimates`) || PathPrefix(`bitcoin-mainnet/scripthash`) || PathPrefix(`bitcoin-mainnet/asset`))}
|
||||
- traefik.http.routers.bitcoin-mainnet-bitcoind-full-esplora.middlewares=bitcoin-mainnet-bitcoind-full-esplora-stripprefix, ipallowlist
|
||||
|
||||
volumes:
|
||||
bitcoin-mainnet-bitcoind-full:
|
||||
bitcoin-mainnet-bitcoind-full_esplora:
|
||||
|
||||
x-upstreams:
|
||||
- id: $${ID}
|
||||
|
||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
||||
|
||||
services:
|
||||
bitcoin-testnet:
|
||||
image: ${BITCOIN_BITCOIND_IMAGE:-lncm/bitcoind}:${BITCOIN_TESTNET_BITCOIND_VERSION:-v28.0}
|
||||
image: ${BITCOIN_BITCOIND_IMAGE:-bitcoin/bitcoin}:${BITCOIN_TESTNET_BITCOIND_VERSION:-31.0}
|
||||
sysctls:
|
||||
# TCP Performance
|
||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||
@@ -57,15 +57,21 @@ services:
|
||||
entrypoint: [bitcoind]
|
||||
command:
|
||||
- -datadir=/data
|
||||
- -dbcache=4096
|
||||
- -disablewallet=1
|
||||
- -externalip=${IP}
|
||||
- -maxconnections=64
|
||||
- -port=13668
|
||||
- -printtoconsole
|
||||
- -rpcallowip=::/0
|
||||
- -rpcauth=username:0b6623bdebb516ced10631668833e42a$$c478b38890678c51b9f013174a20addb317c2046b68c05e0250ff86e31a505f7
|
||||
- -rpcbind=0.0.0.0
|
||||
- -rpcport=8545
|
||||
- -rpcthreads=16
|
||||
- -rpcworkqueue=512
|
||||
- -server
|
||||
- -testnet
|
||||
- -txindex=1
|
||||
- -zmqpubhashblock=tcp://0.0.0.0:28332
|
||||
- -zmqpubhashtx=tcp://0.0.0.0:28333
|
||||
- -zmqpubrawblock=tcp://0.0.0.0:28334
|
||||
@@ -118,40 +124,8 @@ services:
|
||||
- ${NO_SSL:+traefik.http.routers.bitcoin-testnet-bitcoind-full-rawtx.rule=PathPrefix(`/bitcoin-testnet/rawtx`)}
|
||||
- traefik.http.routers.bitcoin-testnet-bitcoind-full-rawtx.middlewares=bitcoin-testnet-bitcoind-full-stripprefix, ipallowlist
|
||||
|
||||
bitcoin-testnet-indexer:
|
||||
image: blockstream/esplora
|
||||
expose:
|
||||
- 3000 # HTTP
|
||||
- 50001 # RPC (electrum)
|
||||
environment:
|
||||
- ELECTRS_DAEMON_P2P_ADDR=bitcoin-testnet:13668
|
||||
- ELECTRS_DAEMON_RPC_ADDR=bitcoin-testnet:8545
|
||||
- ELECTRS_DB_DIR=/data/electrs
|
||||
- ELECTRS_ELECTRUM_RPC_ADDR=0.0.0.0:50001
|
||||
- ELECTRS_HTTP_ADDR=0.0.0.0:3000
|
||||
- ELECTRS_JSONRPC_IMPORT=true
|
||||
- ELECTRS_NETWORK=bitcoin-testnet
|
||||
- ELECTRS_RPC_PASS=password
|
||||
- ELECTRS_RPC_USER=username
|
||||
networks:
|
||||
- chains
|
||||
volumes:
|
||||
- ${BITCOIN_TESTNET_BITCOIND_FULL__ESPLORA_DATA:-bitcoin-testnet-bitcoind-full_esplora}:/data
|
||||
logging: *logging-defaults
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.service=bitcoin-testnet-bitcoind-full-esplora
|
||||
- traefik.http.middlewares.bitcoin-testnet-bitcoind-full-esplora-stripprefix.stripprefix.prefixes=/bitcoin-testnet
|
||||
- traefik.http.services.bitcoin-testnet-bitcoind-full-esplora.loadbalancer.server.port=3000
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.entrypoints=websecure}
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.tls.certresolver=myresolver}
|
||||
- ${NO_SSL:-traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.rule=Host(`$DOMAIN`) && (PathPrefix(`bitcoin-testnet/address`) || PathPrefix(`bitcoin-testnet/tx`) || PathPrefix(`bitcoin-testnet/block`) || PathPrefix(`bitcoin-testnet/blocks`) || PathPrefix(`bitcoin-testnet/mempool`) || PathPrefix(`bitcoin-testnet/fee-estimates`) || PathPrefix(`bitcoin-testnet/scripthash`) || PathPrefix(`bitcoin-testnet/asset`))}
|
||||
- ${NO_SSL:+traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.rule=PathPrefix(`bitcoin-testnet/address`) || PathPrefix(`bitcoin-testnet/tx`) || PathPrefix(`bitcoin-testnet/block`) || PathPrefix(`bitcoin-testnet/blocks`) || PathPrefix(`bitcoin-testnet/mempool`) || PathPrefix(`bitcoin-testnet/fee-estimates`) || PathPrefix(`bitcoin-testnet/scripthash`) || PathPrefix(`bitcoin-testnet/asset`))}
|
||||
- traefik.http.routers.bitcoin-testnet-bitcoind-full-esplora.middlewares=bitcoin-testnet-bitcoind-full-esplora-stripprefix, ipallowlist
|
||||
|
||||
volumes:
|
||||
bitcoin-testnet-bitcoind-full:
|
||||
bitcoin-testnet-bitcoind-full_esplora:
|
||||
|
||||
x-upstreams:
|
||||
- id: $${ID}
|
||||
|
||||
Reference in New Issue
Block a user