Skip to content

Commit 2bc79b7

Browse files
committed
Start docker network before services
1 parent c52425b commit 2bc79b7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Diff for: docker/run-p2pool.sh

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/bin/bash
22

3+
# Display help message if --help flag is provided
4+
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
5+
echo "Usage: $0 [network] [docker-compose options]"
6+
echo ""
7+
echo "Options:"
8+
echo " network The Bitcoin network to use (signet or testnet4). Default: signet"
9+
echo " docker-compose options Any additional options to pass to docker-compose"
10+
echo ""
11+
echo "Examples:"
12+
echo " $0 Run on signet network"
13+
echo " $0 testnet4 Run on testnet4 network"
14+
echo " $0 signet bitcoind-data Run bitcoind on signet network volume"
15+
exit 0
16+
fi
17+
18+
319
# Default to signet if no network is specified
420
NETWORK=${1:-signet}
521

@@ -23,8 +39,11 @@ export BTC_RPC_PORT=$BTC_RPC_PORT
2339
# Remove the first argument (network) to pass remaining args to docker-compose
2440
shift
2541

42+
# Start network interfaces, so we can services one by one and let them connect to each other
43+
docker compose up --no-start
44+
2645
# Stop all earlier instances to avoid conflicting services
27-
docker compose down
46+
# docker compose down "$@"
2847

2948
# Run docker-compose with the specified configuration
3049
docker compose up "$@"

0 commit comments

Comments
 (0)