2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-01 03:20:53 +00:00

Docker cleanup and docker-compose start

This commit is contained in:
Andreas M. Antonopoulos 2020-06-17 13:43:37 -04:00
parent 5c1248c845
commit bcaa4eed78
20 changed files with 87 additions and 18 deletions

View File

@ -9,6 +9,8 @@ RUN add-apt-repository -u ppa:lightningnetwork/ppa
RUN apt-get install -yqq \
lightningd
ADD https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/lightning-cli.bash-completion /usr/share/bash-completion/completions/lightning-cli
FROM c-lightning-base AS c-lightning-run
ADD lightningd /lightningd
@ -20,7 +22,8 @@ ADD c-lightning-entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/c-lightning-entrypoint.sh
ADD fund-c-lightning.sh /usr/local/bin
RUN chmod +x /usr/local/bin/fund-c-lightning.sh
ADD https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/lightning-cli.bash-completion /usr/share/bash-completion/completions/lightning-cli
ADD logtail.sh /usr/local/bin
RUN chmod +x /usr/local/bin/logtail.sh
EXPOSE 9735 9835
ENTRYPOINT ["/usr/local/bin/c-lightning-entrypoint.sh"]

View File

@ -6,3 +6,4 @@ bitcoin-rpcconnect=bitcoind
bitcoin-rpcport=18443
log-level=debug
log-file=/lightningd/lightningd.log

View File

@ -0,0 +1,5 @@
#!/bin/bash
set -Eeuo pipefail
# Show LND log from beginning and follow
tail -n +1 -f /lightningd/lightningd.log || true

View File

@ -23,7 +23,8 @@ RUN ln -s /eclair /root/.eclair
ADD bashrc /root/.bashrc
ADD eclair-entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/eclair-entrypoint.sh
ADD logtail.sh /usr/local/bin
RUN chmod +x /usr/local/bin/logtail.sh
EXPOSE 9735
ENTRYPOINT ["/usr/local/bin/eclair-entrypoint.sh"]

View File

@ -0,0 +1,5 @@
#!/bin/bash
set -Eeuo pipefail
# Show LND log from beginning and follow
tail -n +1 -f /eclair/eclair.log || true

View File

@ -1,18 +1,72 @@
version: "3.3"
networks:
lnnet:
services:
bitcoind-regtest:
container_name: bitcoind
build:
context: ../bitcoind-regtest/.
dockerfile: ./Dockerfile
image: lnbook/bitcoind-regtest:latest
ports:
- "18443:18443"
- "12005:12005"
- "12006:12006"
lnd-run:
container_name: lnd
build:
context: ../lnd-run
dockerfile: ./Dockerfile
image: lnbook/lnd-run:latest
bitcoind:
container_name: bitcoind
build:
context: ../bitcoind
image: lnbook/bitcoind:latest
networks:
- lnnet
expose:
- "18443"
- "12005"
- "12006"
healthcheck:
test: bitcoin-cli -datadir=/bitcoind getblockchaininfo
interval: 2s
timeout: 5s
retries: 30
Alice:
container_name: Alice
build:
context: ../lnd
image: lnbook/lnd:latest
depends_on:
- bitcoind
networks:
- lnnet
expose:
- "9735"
Bob:
container_name: Bob
build:
context: ../c-lightning
image: lnbook/c-lightning:latest
depends_on:
- bitcoind
- Alice
networks:
- lnnet
expose:
- "9735"
Wei:
container_name: Wei
build:
context: ../eclair
image: lnbook/eclair:latest
depends_on:
- bitcoind
- Bob
networks:
- lnnet
expose:
- "9735"
Gloria:
container_name: Gloria
build:
context: ../lnd
image: lnbook/lnd:latest
depends_on:
- bitcoind
- Wei
networks:
- lnnet
expose:
- "9735"