Skip to content

Commit

Permalink
docker: add BITCOIN_NETWORK param
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewshvv authored and Roasbeef committed Jan 18, 2017
1 parent 67b300f commit 0948bc3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docker/btcd/start-btcctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ set_default() {
# Set default variables if needed.
RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")

btcctl \
--simnet \
"--$BITCOIN_NETWORK" \
--rpccert="/rpc/rpc.cert" \
--rpcuser="$RPCUSER" \
--rpcpass="$RPCPASS" \
Expand Down
3 changes: 2 additions & 1 deletion docker/btcd/start-btcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ set_default() {
RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass")
DEBUG=$(set_default "$DEBUG" "info")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")

PARAMS=$(echo \
"--simnet" \
"--$BITCOIN_NETWORK" \
"--debuglevel=$DEBUG" \
"--rpcuser=$RPCUSER" \
"--rpcpass=$RPCPASS" \
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
environment:
- RPCUSER
- RPCPASS
- BITCOIN_NETWORK

btcd:
extends: btc
Expand All @@ -38,6 +39,7 @@ services:
environment:
- RPCUSER
- RPCPASS
- BITCOIN_NETWORK
- DEBUG
volumes:
- shared:/rpc
Expand Down
3 changes: 2 additions & 1 deletion docker/lnd/start-lnd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ set_default() {
RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass")
DEBUG=$(set_default "$DEBUG" "debug")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")

lnd \
--datadir="/data" \
--logdir="/data" \
--simnet \
"--$BITCOIN_NETWORK" \
--btcdhost="btcd" \
--rpccert="/rpc/rpc.cert" \
--rpcuser="$RPCUSER" \
Expand Down

0 comments on commit 0948bc3

Please sign in to comment.