Skip to content

Commit 3e11a0f

Browse files
committed
fix(compose+init): bitcoind -chain main (not mainnet); explicit CMD for API daemons
1 parent 17e7061 commit 3e11a0f

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.ecc/memory/project/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

docker-compose.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ services:
138138
- "./bitcoin-data:/home/bitcoin/.bitcoin"
139139
command:
140140
- "-printtoconsole=1"
141-
- "-chain=${BITCOIN_NETWORK:-mainnet}"
141+
# Bitcoin Core's -chain wants "main", not "mainnet" — override with
142+
# BITCOIN_CORE_CHAIN in .env (init.sh derives it).
143+
- "-chain=${BITCOIN_CORE_CHAIN:-${BITCOIN_NETWORK:-mainnet}}"
142144
- "-rpcbind=0.0.0.0:8332"
143145
- "-rpcallowip=0.0.0.0/0"
144146
- "-rpcuser=${BITCOIN_RPC_USERNAME}"
@@ -269,6 +271,9 @@ services:
269271
api-blockchain-scanner-daemon:
270272
<<: *common
271273
image: "${ML_API_SCANNER_IMAGE:-ghcr.io/mintlayer/web-gui/api-blockchain-scanner-daemon:latest}"
274+
# The daemon runtime image has no baked-in CMD; the entrypoint (gosu
275+
# wrapper) needs the binary path as its argument.
276+
command: "/usr/bin/api-blockchain-scanner-daemon"
272277
labels:
273278
com.centurylinklabs.watchtower.enable: "true"
274279
depends_on:
@@ -291,6 +296,8 @@ services:
291296

292297
api-web-server:
293298
image: "${ML_API_WEB_SERVER_IMAGE:-ghcr.io/mintlayer/web-gui/api-web-server:latest}"
299+
# No baked-in CMD in the runtime image — pass the binary explicitly.
300+
command: "/usr/bin/api-web-server"
294301
labels:
295302
com.centurylinklabs.watchtower.enable: "true"
296303
depends_on:

init.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,13 @@ else
702702
BITCOIN_PRUNE=0
703703
fi
704704

705+
# Bitcoin Core's -chain flag wants "main" for mainnet ("mainnet" is
706+
# rejected with CreateBaseChainParams). Other network names pass through.
707+
BITCOIN_CORE_CHAIN="main"
708+
if [[ -n "$BITCOIN_NETWORK" && "$BITCOIN_NETWORK" != "mainnet" ]]; then
709+
BITCOIN_CORE_CHAIN="$BITCOIN_NETWORK"
710+
fi
711+
705712
# Build the full wallet-rpc-daemon command (avoids shell expansion tricks in docker-compose)
706713
WALLET_RPC_CMD="wallet-rpc-daemon ${NETWORK}"
707714

@@ -760,6 +767,7 @@ API_WEB_SERVER_PORT=${API_WEB_SERVER_PORT}
760767
# Bitcoin node + BTC wallet (only used with --profile bitcoin)
761768
BITCOIN_ENABLED=${BITCOIN_ENABLED}
762769
BITCOIN_NETWORK=${BITCOIN_NETWORK}
770+
BITCOIN_CORE_CHAIN=${BITCOIN_CORE_CHAIN}
763771
BITCOIN_RPC_USERNAME=${BITCOIN_RPC_USERNAME}
764772
BITCOIN_RPC_PASSWORD=${BITCOIN_RPC_PASSWORD}
765773
BITCOIN_WALLET_HTTP_USERNAME=${BITCOIN_WALLET_HTTP_USERNAME}

0 commit comments

Comments
 (0)