Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose.yaml.template: image #210

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/plebnet-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ jobs:
# play defaults to the lnd container
play lnd config

- name: play lnd "lncli -h"
if: ${{ !env.ACT }}
run: |
play lnd "lncli -h"
#- name: play lnd "lncli -h"
# if: ${{ !env.ACT }}
# run: |
# play lnd "lncli -h"

- name: play-lnd config
if: ${{ !env.ACT }}
Expand Down
23 changes: 12 additions & 11 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -441,21 +441,23 @@ endif

#######################
.ONESHELL:
docker-start:## start docker
test -d .venv || $(PYTHON3) -m virtualenv .venv
( \
source .venv/bin/activate; pip install -q -r requirements.txt; \
python3 -m pip install -q omegaconf \
pip install -q --upgrade pip; \
docker-start:
## docker-start
@touch requirements.txt && $(PYTHON3) -m pip install -q -r requirements.txt
@test -d .venv || $(PYTHON3) -m virtualenv .venv
@( \
source .venv/bin/activate; $(PYTHON3) -m pip install -q -r requirements.txt; \
$(PYTHON3) -m pip install -q --upgrade pip; \
);
( \
while ! docker system info > /dev/null 2>&1; do\
echo 'Waiting for docker to start...';\
if [[ '$(OS)' == 'Linux' ]]; then\
systemctl restart docker.service;\
type -P apt && apt install docker*;\
type -P systemctl && systemctl restart docker.service || type -P service && service docker.service restart || type -P apk && apk add openrc docker && rc-service docker restart || echo "try installing docker manually...";\
fi;\
if [[ '$(OS)' == 'Darwin' ]]; then\
open --background -a /./Applications/Docker.app/Contents/MacOS/Docker;\
open --background -a /Applications/Docker.app/Contents/MacOS/Docker;\
fi;\
sleep 1;\
done\
Expand Down Expand Up @@ -548,12 +550,11 @@ cluster:venv## create playground-cluster
ifeq ($(cluster),remove)
$(MAKE) prune-cluster
else
ln -sF .venv $(PWD)/cluster/.venv
test -d .venv || $(PYTHON3) -m virtualenv .venv
( \
source .venv/bin/activate; pip install -q -r requirements.txt; \
python3 -m pip install -q omegaconf; \
pushd cluster && ./up-generic.sh bitcoind=5 lnd=0 && popd; \
$(PYTHON#) -m pip install -q omegaconf; \
pushd cluster && make run && popd; \
);
endif
@docker ps | grep cluster || echo
Expand Down
201 changes: 201 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
version: '3.4'
networks: {}
services:
bitcoind:
image: ghcr.io/plebnet-playground/plebnet-playground-docker/bitcoind-x86_64-linux-gnu/root:v0.5.12
build:
context: ./bitcoin-signet
dockerfile: Dockerfile
args:
- TRIPLET=x86_64-linux-gnu
links:
- tor
depends_on:
- tor
restart: unless-stopped
container_name: playground-bitcoind
environment:
TRIPLET: x86_64-linux-gnu
GET_COINS_ON_STARTUP: 'true'
expose:
- '38332'
- '38333'
- '38334'
ports:
- 38333:38333
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/bitcoin_datadir
target: /root/.bitcoin/
lnd:
links:
- bitcoind
- tor
depends_on:
- bitcoind
- tor
environment:
TRIPLET: x86_64-linux-gnu
LND_ALIAS: LNDNode
LND_LISTEN: playground-lnd:9735
LND_RPCLISTEN: playground-lnd:10009
LND_RESTLISTEN: playground-lnd:8080
zmqpubrawblock: tcp://playground-bitcoind:28332
zmqpubrawtx: tcp://playground-bitcoind:28333
torsocks: playground-tor:9050
torcontrol: playground-tor:9051
tlsextradomain: playground-lnd
rpchost: playground-bitcoind
restart: unless-stopped
container_name: playground-lnd
image: ghcr.io/plebnet-playground/plebnet-playground-docker/lnd-x86_64-linux-gnu/root:v0.5.12
build:
context: ./lnd-signet
dockerfile: Dockerfile
expose:
- '8080'
- '9735'
- '9911'
- '10009'
ports:
- 8080:8080
- 9735:9735
- 9911:9911
- 10009:10009
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir
target: /root/.lnd/
cln:
links:
- bitcoind
- tor
depends_on:
- bitcoind
- tor
environment:
CLN_ALIAS: CLNNode
BITCOIN_RPC_HOST: playground-bitcoind
TOR_PROXY: playground-tor:9050
TOR_ADDR: playground-tor:9051
LIGHTNINGD_PORT: '9736'
restart: unless-stopped
container_name: playground-cln
build:
context: ./cln-signet
dockerfile: Dockerfile
expose:
- '9736'
ports:
- 9736:9736
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/cln_datadir
target: /root/.lightning/
tor:
restart: unless-stopped
container_name: playground-tor
image: ghcr.io/plebnet-playground/plebnet-playground-docker/tor-x86_64-linux-gnu/root:v0.5.12
build:
context: ./tor
dockerfile: Dockerfile
expose:
- 9050
- 9051
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_datadir
target: /home/tor/.tor
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_torrcdir
target: /usr/local/etc/tor
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_servicesdir
target: /var/lib/tor/hidden_services
thunderhub:
container_name: playground-thub
depends_on:
- lnd
- bitcoind
links:
- bitcoind
- lnd
image: ghcr.io/plebnet-playground/plebnet-playground-docker/thunderhub-x86_64-linux-gnu/root:v0.5.12
build:
context: ./thub
dockerfile: Dockerfile
restart: unless-stopped
stop_signal: SIGKILL
environment:
NO_VERSION_CHECK: 'true'
ACCOUNT_CONFIG_PATH: /data/thubConfig.yaml
LOG_LEVEL: debug
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir
target: /etc/lnd
read_only: true
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/thub_datadir
target: /data
ports:
- 3001:3000
rtl:
container_name: playground-rtl
links:
- lnd
- bitcoind
depends_on:
- lnd
- bitcoind
restart: unless-stopped
environment:
LND_SERVER_URL: https://playground-lnd:8080/v1
MACAROON_PATH: /root/.lnd/data/chain/bitcoin/signet
RTL_CONFIG_PATH: /data/
LND_CONFIG_PATH: /root/.lnd/lnd.conf
BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf
RTL_SSO: 0
RTL_COOKIE_PATH: ''
LOGOUT_REDIRECT_LINK: ''
CONFIG_PATH: ''
LN_IMPLEMENTATION: LND
ports:
- 3000:3000
image: shahanafarooqui/rtl:0.13.6
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir
target: /root/.lnd/
read_only: true
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/bitcoin_datadir
target: /etc/bitcoin/
read_only: true
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/rtl_datadir
target: /data
docs:
links:
- tor
depends_on:
- tor
restart: unless-stopped
container_name: playground-docs
environment:
- TRIPLET=x86_64-linux-gnu
image: ghcr.io/plebnet-playground/plebnet-playground-docker/docs-x86_64-linux-gnu/root:v0.5.12
build:
context: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/docs
dockerfile: Dockerfile
args:
- TRIPLET=x86_64-linux-gnu
expose:
- '8000'
- '8008'
ports:
- 8008:8000
volumes:
- type: bind
source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/docs
target: /docs
5 changes: 5 additions & 0 deletions docker-compose.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3.4"
networks: {}
services:
bitcoind:
image: ghcr.io/plebnet-playground/plebnet-playground-docker/bitcoind-${TRIPLET}/root:v0.5.12
build:
context: ./bitcoin-signet
dockerfile: Dockerfile
Expand Down Expand Up @@ -48,6 +49,7 @@ services:
rpchost: 'playground-bitcoind'
restart: unless-stopped
container_name: playground-lnd
image: ghcr.io/plebnet-playground/plebnet-playground-docker/lnd-${TRIPLET}/root:v0.5.12
build:
context: ./lnd-signet
dockerfile: Dockerfile
Expand Down Expand Up @@ -94,6 +96,7 @@ services:
tor:
restart: unless-stopped
container_name: playground-tor
image: ghcr.io/plebnet-playground/plebnet-playground-docker/tor-${TRIPLET}/root:v0.5.12
build:
context: ./tor
dockerfile: Dockerfile
Expand All @@ -118,6 +121,7 @@ services:
links:
- bitcoind
- lnd
image: ghcr.io/plebnet-playground/plebnet-playground-docker/thunderhub-${TRIPLET}/root:v0.5.12
build:
context: ./thub
dockerfile: Dockerfile
Expand Down Expand Up @@ -263,6 +267,7 @@ services:
container_name: playground-docs
environment:
- TRIPLET=${TRIPLET}
image: ghcr.io/plebnet-playground/plebnet-playground-docker/docs-${TRIPLET}/root:v0.5.12
build:
context: ${oc.env:PWD}/docs
dockerfile: Dockerfile
Expand Down