mirror of
https://github.com/apotdevin/thunderhub.git
synced 2026-08-13 12:33:08 +02:00
252 lines
8 KiB
YAML
252 lines
8 KiB
YAML
services:
|
|
bitcoind:
|
|
image: lightninglabs/bitcoin-core:29
|
|
restart: unless-stopped
|
|
command:
|
|
- -regtest
|
|
- -server
|
|
- -rpcuser=rpcuser
|
|
- -rpcpassword=rpcpassword
|
|
- -rpcallowip=0.0.0.0/0
|
|
- -rpcbind=0.0.0.0
|
|
- -zmqpubrawblock=tcp://0.0.0.0:28332
|
|
- -zmqpubrawtx=tcp://0.0.0.0:28333
|
|
- -fallbackfee=0.00001
|
|
- -txindex=1
|
|
ports:
|
|
- "18443:18443"
|
|
volumes:
|
|
- ./data/bitcoind:/home/bitcoin/.bitcoin
|
|
networks:
|
|
- litd-net
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"bitcoin-cli",
|
|
"-regtest",
|
|
"-rpcuser=rpcuser",
|
|
"-rpcpassword=rpcpassword",
|
|
"getblockcount",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 10s
|
|
|
|
bitcoind-init:
|
|
image: lightninglabs/bitcoin-core:29
|
|
depends_on:
|
|
bitcoind:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
HEIGHT=$$(bitcoin-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword -rpcconnect=bitcoind getblockcount 2>/dev/null || echo 0)
|
|
if [ "$$HEIGHT" -lt 1 ]; then
|
|
echo "Mining 6 initial blocks..."
|
|
bitcoin-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword -rpcconnect=bitcoind createwallet miner >/dev/null 2>&1 || true
|
|
ADDR=$$(bitcoin-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword -rpcconnect=bitcoind -rpcwallet=miner getnewaddress)
|
|
bitcoin-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword -rpcconnect=bitcoind generatetoaddress 6 "$$ADDR" >/dev/null
|
|
echo "Initial blocks mined"
|
|
else
|
|
echo "Chain has $$HEIGHT blocks, skipping"
|
|
fi
|
|
networks:
|
|
- litd-net
|
|
|
|
litd-alice:
|
|
image: lightninglabs/lightning-terminal:v0.16.1-alpha
|
|
restart: unless-stopped
|
|
depends_on:
|
|
bitcoind-init:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
- BITCOIN_RPC_HOST=bitcoind
|
|
entrypoint: ["/scripts/litd-entrypoint.sh"]
|
|
command:
|
|
- --httpslisten=0.0.0.0:8443
|
|
- --tlsextradomain=litd-alice
|
|
- --tlsextraip=0.0.0.0
|
|
- --uipassword=testpassword123!
|
|
- --lnd-mode=integrated
|
|
- --network=regtest
|
|
- --lnd.bitcoin.regtest
|
|
- --lnd.bitcoin.node=bitcoind
|
|
- --lnd.bitcoind.rpchost=bitcoind:18443
|
|
- --lnd.bitcoind.rpcuser=rpcuser
|
|
- --lnd.bitcoind.rpcpass=rpcpassword
|
|
- --lnd.bitcoind.zmqpubrawblock=tcp://bitcoind:28332
|
|
- --lnd.bitcoind.zmqpubrawtx=tcp://bitcoind:28333
|
|
- --lnd.rpclisten=0.0.0.0:10009
|
|
- --lnd.restlisten=0.0.0.0:8080
|
|
- --lnd.listen=0.0.0.0:9735
|
|
- --lnd.noseedbackup
|
|
- --lnd.alias=alice
|
|
- --lnd.debuglevel=info
|
|
- --lnd.tlsextradomain=litd-alice
|
|
- --lnd.tlsextraip=0.0.0.0
|
|
- --lnd.protocol.option-scid-alias
|
|
- --lnd.protocol.zero-conf
|
|
- --lnd.protocol.simple-taproot-chans
|
|
- --lnd.protocol.simple-taproot-overlay-chans
|
|
- --lnd.protocol.custom-message=17
|
|
- --lnd.accept-keysend
|
|
- --autopilot.disable
|
|
- --taproot-assets.universe.public-access=rw
|
|
- --taproot-assets.proofcourieraddr=universerpc://litd-alice:8443
|
|
- --taproot-assets.universerpccourier.skipinitdelay
|
|
- --taproot-assets.rpclisten=0.0.0.0:10029
|
|
- --taproot-assets.allow-public-uni-proof-courier
|
|
- --taproot-assets.universe.sync-all-assets
|
|
- --taproot-assets.allow-public-stats
|
|
ports:
|
|
- "8443:8443"
|
|
- "10009:10009"
|
|
- "9735:9735"
|
|
volumes:
|
|
- ./data/alice-litd:/root/.lit
|
|
- ./data/alice-lnd:/root/.lnd
|
|
- ./litd-entrypoint.sh:/scripts/litd-entrypoint.sh:ro
|
|
networks:
|
|
- litd-net
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"lncli --network=regtest getinfo && test -f /root/.lit/regtest/super.macaroon",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 120s
|
|
|
|
litd-bob:
|
|
image: lightninglabs/lightning-terminal:v0.16.1-alpha
|
|
restart: unless-stopped
|
|
depends_on:
|
|
bitcoind-init:
|
|
condition: service_completed_successfully
|
|
environment:
|
|
- BITCOIN_RPC_HOST=bitcoind
|
|
entrypoint: ["/scripts/litd-entrypoint.sh"]
|
|
command:
|
|
- --httpslisten=0.0.0.0:8443
|
|
- --tlsextradomain=litd-bob
|
|
- --tlsextraip=0.0.0.0
|
|
- --uipassword=testpassword123!
|
|
- --lnd-mode=integrated
|
|
- --network=regtest
|
|
- --lnd.bitcoin.regtest
|
|
- --lnd.bitcoin.node=bitcoind
|
|
- --lnd.bitcoind.rpchost=bitcoind:18443
|
|
- --lnd.bitcoind.rpcuser=rpcuser
|
|
- --lnd.bitcoind.rpcpass=rpcpassword
|
|
- --lnd.bitcoind.zmqpubrawblock=tcp://bitcoind:28332
|
|
- --lnd.bitcoind.zmqpubrawtx=tcp://bitcoind:28333
|
|
- --lnd.rpclisten=0.0.0.0:10009
|
|
- --lnd.restlisten=0.0.0.0:8080
|
|
- --lnd.listen=0.0.0.0:9735
|
|
- --lnd.noseedbackup
|
|
- --lnd.alias=bob
|
|
- --lnd.debuglevel=info
|
|
- --lnd.tlsextradomain=litd-bob
|
|
- --lnd.tlsextraip=0.0.0.0
|
|
- --lnd.protocol.option-scid-alias
|
|
- --lnd.protocol.zero-conf
|
|
- --lnd.protocol.simple-taproot-chans
|
|
- --lnd.protocol.simple-taproot-overlay-chans
|
|
- --lnd.protocol.custom-message=17
|
|
- --lnd.accept-keysend
|
|
- --autopilot.disable
|
|
- --taproot-assets.allow-public-uni-proof-courier
|
|
- --taproot-assets.universe.public-access=rw
|
|
- --taproot-assets.proofcourieraddr=universerpc://litd-bob:8443
|
|
- --taproot-assets.universerpccourier.skipinitdelay
|
|
ports:
|
|
- "8444:8443"
|
|
- "10010:10009"
|
|
- "9736:9735"
|
|
volumes:
|
|
- ./data/bob-litd:/root/.lit
|
|
- ./data/bob-lnd:/root/.lnd
|
|
- ./litd-entrypoint.sh:/scripts/litd-entrypoint.sh:ro
|
|
networks:
|
|
- litd-net
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"lncli --network=regtest getinfo && test -f /root/.lit/regtest/super.macaroon",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 120s
|
|
|
|
thunderhub-alice:
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/litd/Dockerfile.dev
|
|
restart: unless-stopped
|
|
user: root
|
|
depends_on:
|
|
litd-alice:
|
|
condition: service_healthy
|
|
environment:
|
|
- NODE_ENV=development
|
|
- ACCOUNT_CONFIG_PATH=/config/thubConfig.yaml
|
|
- LOG_LEVEL=debug
|
|
- COOKIE_PATH=/tmp/cookie-alice
|
|
- DB_TYPE=sqlite
|
|
- DB_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
- DB_SQLITE_PATH=/data/thunderhub/thunderhub.db
|
|
- TRADE_API_URL=${TRADE_API_URL:-http://host.docker.internal:3006/graphql}
|
|
- AMBOSS_AUTH_URL=${AMBOSS_AUTH_URL:-http://host.docker.internal:3007/graphql}
|
|
# host-gateway resolves to the host IP on all platforms (Docker 20.10+)
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./alice-thubConfig.yaml:/config/thubConfig.yaml
|
|
- ./data/alice-litd:/data/litd:ro
|
|
- ./data/alice-lnd:/data/lnd:ro
|
|
- ./data/alice-thunderhub:/data/thunderhub
|
|
networks:
|
|
- litd-net
|
|
|
|
thunderhub-bob:
|
|
build:
|
|
context: ../..
|
|
dockerfile: docker/litd/Dockerfile.dev
|
|
restart: unless-stopped
|
|
user: root
|
|
depends_on:
|
|
litd-bob:
|
|
condition: service_healthy
|
|
environment:
|
|
- NODE_ENV=development
|
|
- ACCOUNT_CONFIG_PATH=/config/thubConfig.yaml
|
|
- LOG_LEVEL=debug
|
|
- COOKIE_PATH=/tmp/cookie-bob
|
|
- DB_TYPE=sqlite
|
|
- DB_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
- DB_SQLITE_PATH=/data/thunderhub/thunderhub.db
|
|
- TRADE_API_URL=${TRADE_API_URL:-http://host.docker.internal:3006/graphql}
|
|
- AMBOSS_AUTH_URL=${AMBOSS_AUTH_URL:-http://host.docker.internal:3007/graphql}
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "3001:3000"
|
|
volumes:
|
|
- ./bob-thubConfig.yaml:/config/thubConfig.yaml
|
|
- ./data/bob-litd:/data/litd:ro
|
|
- ./data/bob-lnd:/data/lnd:ro
|
|
- ./data/bob-thunderhub:/data/thunderhub
|
|
networks:
|
|
- litd-net
|
|
|
|
networks:
|
|
litd-net:
|