docker: add BITCOIN_NETWORK param

This commit is contained in:
Andrey Samokhvalov 2017-01-13 23:25:51 +03:00 committed by Olaoluwa Osuntokun
parent 67b300fdc4
commit 0948bc3579
4 changed files with 8 additions and 3 deletions

@ -41,9 +41,10 @@ set_default() {
# Set default variables if needed. # Set default variables if needed.
RPCUSER=$(set_default "$RPCUSER" "devuser") RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass") RPCPASS=$(set_default "$RPCPASS" "devpass")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")
btcctl \ btcctl \
--simnet \ "--$BITCOIN_NETWORK" \
--rpccert="/rpc/rpc.cert" \ --rpccert="/rpc/rpc.cert" \
--rpcuser="$RPCUSER" \ --rpcuser="$RPCUSER" \
--rpcpass="$RPCPASS" \ --rpcpass="$RPCPASS" \

@ -42,9 +42,10 @@ set_default() {
RPCUSER=$(set_default "$RPCUSER" "devuser") RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass") RPCPASS=$(set_default "$RPCPASS" "devpass")
DEBUG=$(set_default "$DEBUG" "info") DEBUG=$(set_default "$DEBUG" "info")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")
PARAMS=$(echo \ PARAMS=$(echo \
"--simnet" \ "--$BITCOIN_NETWORK" \
"--debuglevel=$DEBUG" \ "--debuglevel=$DEBUG" \
"--rpcuser=$RPCUSER" \ "--rpcuser=$RPCUSER" \
"--rpcpass=$RPCPASS" \ "--rpcpass=$RPCPASS" \

@ -14,6 +14,7 @@ services:
environment: environment:
- RPCUSER - RPCUSER
- RPCPASS - RPCPASS
- BITCOIN_NETWORK
btcd: btcd:
extends: btc extends: btc
@ -38,6 +39,7 @@ services:
environment: environment:
- RPCUSER - RPCUSER
- RPCPASS - RPCPASS
- BITCOIN_NETWORK
- DEBUG - DEBUG
volumes: volumes:
- shared:/rpc - shared:/rpc

@ -42,11 +42,12 @@ set_default() {
RPCUSER=$(set_default "$RPCUSER" "devuser") RPCUSER=$(set_default "$RPCUSER" "devuser")
RPCPASS=$(set_default "$RPCPASS" "devpass") RPCPASS=$(set_default "$RPCPASS" "devpass")
DEBUG=$(set_default "$DEBUG" "debug") DEBUG=$(set_default "$DEBUG" "debug")
BITCOIN_NETWORK=$(set_default "$BITCOIN_NETWORK" "simnet")
lnd \ lnd \
--datadir="/data" \ --datadir="/data" \
--logdir="/data" \ --logdir="/data" \
--simnet \ "--$BITCOIN_NETWORK" \
--btcdhost="btcd" \ --btcdhost="btcd" \
--rpccert="/rpc/rpc.cert" \ --rpccert="/rpc/rpc.cert" \
--rpcuser="$RPCUSER" \ --rpcuser="$RPCUSER" \