diff --git a/docker/README.md b/docker/README.md index 474188c5..1dc79dbb 100644 --- a/docker/README.md +++ b/docker/README.md @@ -63,8 +63,12 @@ bitcoin into. # Init bitcoin network env variable: $ export NETWORK="simnet" +# Create persistent volumes for alice and bob. +docker volume create simnet_lnd_alice +docker volume create simnet_lnd_bob + # Run the "Alice" container and log into it: -$ docker-compose run -d --name alice lnd_btc +$ docker-compose run -d --name alice --volume simnet_lnd_alice:/root/.lnd lnd_btc $ docker exec -i -t alice bash # Generate a new backward compatible nested p2sh address for Alice: @@ -90,7 +94,7 @@ Connect `Bob` node to `Alice` node. ```bash # Run "Bob" node and log into it: -$ docker-compose run -d --name bob lnd_btc +$ docker-compose run -d --name bob --volume simnet_lnd_bob:/root/.lnd lnd_btc $ docker exec -i -t bob bash # Get the identity pubkey of "Bob" node: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index fc0971b1..8794f688 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -9,8 +9,8 @@ services: build: context: btcd/ volumes: - - shared:/rpc - - bitcoin:/data + - shared:/rpc + - bitcoin:/data environment: - RPCUSER - RPCPASS @@ -41,8 +41,8 @@ services: build: context: ltcd/ volumes: - - shared:/rpc - - litecoin:/data + - shared:/rpc + - litecoin:/data environment: - RPCUSER - RPCPASS @@ -76,7 +76,8 @@ services: - CHAIN - DEBUG volumes: - - shared:/rpc + - shared:/rpc + - lnd:/root/.lnd entrypoint: ["./start-lnd.sh"] lnd_ltc: @@ -102,6 +103,11 @@ volumes: bitcoin: driver: local + # lnd volume is used for persisting lnd application data and chain state + # during container lifecycle. + lnd: + driver: local + # litecoin volume is needed for maintaining blockchain persistence # during ltcd container recreation. litecoin: diff --git a/docker/lnd/start-lnd.sh b/docker/lnd/start-lnd.sh index d65c145d..1fb8502f 100755 --- a/docker/lnd/start-lnd.sh +++ b/docker/lnd/start-lnd.sh @@ -51,7 +51,6 @@ fi exec lnd \ --noseedbackup \ - --logdir="/data" \ "--$CHAIN.active" \ "--$CHAIN.$NETWORK" \ "--$CHAIN.node"="btcd" \