mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-27 14:22:58 +03:00
223 lines
6.2 KiB
YAML
223 lines
6.2 KiB
YAML
# Spin up a regtest lightning network to run integration tests:
|
|
# docker-compose -f docker-tests.yml --env-file tests/compose.env up -d
|
|
|
|
# Some useful handy commands that hopefully are never needed
|
|
|
|
# docker-compose -f docker-tests.yml --env-file tests/compose.env down --volumes
|
|
|
|
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test createwallet default
|
|
# docker exec -it btc bitcoin-cli -chain=regtest -rpcpassword=test -rpcuser=test -generate 101
|
|
|
|
# docker exec -it coordinator-LND lncli --network=regtest getinfo
|
|
# docker exec -it robot-LND lncli --network=regtest --rpcserver localhost:10010 getinfo
|
|
|
|
version: '3.9'
|
|
services:
|
|
bitcoind:
|
|
image: ruimarinho/bitcoin-core:${BITCOIND_VERSION:-24.0.1}-alpine
|
|
container_name: test-btc
|
|
restart: always
|
|
ports:
|
|
- "8000:8000"
|
|
- "8080:8080"
|
|
- "8081:8081"
|
|
- "10009:10009"
|
|
- "10010:10010"
|
|
- "9999:9999"
|
|
- "9998:9998"
|
|
- "5432:5432"
|
|
- "6379:6379"
|
|
- "7777:7777"
|
|
volumes:
|
|
- bitcoin:/bitcoin/.bitcoin/
|
|
- ./tests/bitcoind/entrypoint.sh:/entrypoint.sh
|
|
entrypoint: ["/entrypoint.sh"]
|
|
command:
|
|
--txindex=1
|
|
--printtoconsole
|
|
--regtest=1
|
|
--server=1
|
|
--rest=1
|
|
--rpcuser=test
|
|
--rpcpassword=test
|
|
--logips=1
|
|
--debug=1
|
|
--rpcport=18443
|
|
--rpcallowip=172.0.0.0/8
|
|
--rpcallowip=192.168.0.0/16
|
|
--zmqpubrawblock=tcp://0.0.0.0:28332
|
|
--zmqpubrawtx=tcp://0.0.0.0:28333
|
|
--listenonion=0
|
|
|
|
coordinator-LND:
|
|
image: lightninglabs/lnd:${LND_VERSION:-v0.17.0-beta}
|
|
container_name: test-coordinator-LND
|
|
restart: always
|
|
volumes:
|
|
- bitcoin:/root/.bitcoin/
|
|
- lnd:/home/lnd/.lnd
|
|
- lnd:/root/.lnd
|
|
command:
|
|
--noseedbackup
|
|
--nobootstrap
|
|
--restlisten=localhost:8081
|
|
--debuglevel=debug
|
|
--maxpendingchannels=10
|
|
--rpclisten=0.0.0.0:10009
|
|
--listen=0.0.0.0:9735
|
|
--no-rest-tls
|
|
--color=#4126a7
|
|
--alias=RoboSats
|
|
--bitcoin.active
|
|
--bitcoin.regtest
|
|
--bitcoin.node=bitcoind
|
|
--bitcoind.rpchost=127.0.0.1
|
|
--bitcoind.rpcuser=test
|
|
--bitcoind.rpcpass=test
|
|
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
|
|
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
|
|
--protocol.wumbo-channels
|
|
depends_on:
|
|
- bitcoind
|
|
network_mode: service:bitcoind
|
|
|
|
coordinator-CLN:
|
|
image: elementsproject/lightningd:${CLN_VERSION:-v24.05}
|
|
restart: always
|
|
container_name: test-coordinator-CLN
|
|
environment:
|
|
LIGHTNINGD_NETWORK: 'regtest'
|
|
volumes:
|
|
- cln:/root/.lightning
|
|
- ./docker/cln/plugins/holdinvoice:/root/.lightning/plugins/holdinvoice
|
|
- bitcoin:/root/.bitcoin
|
|
command: --regtest --bitcoin-rpcuser=test --bitcoin-rpcpassword=test --developer --dev-bitcoind-poll=1 --dev-fast-gossip --log-level=debug --bind-addr=127.0.0.1:9737 --max-concurrent-htlcs=483 --grpc-port=9999 --grpc-hold-port=9998 --important-plugin=/root/.lightning/plugins/holdinvoice --database-upgrade=true
|
|
depends_on:
|
|
- bitcoind
|
|
network_mode: service:bitcoind
|
|
|
|
robot-LND:
|
|
image: lightninglabs/lnd:${LND_VERSION:-v0.17.0-beta}
|
|
container_name: test-robot-LND
|
|
restart: always
|
|
volumes:
|
|
- bitcoin:/root/.bitcoin/
|
|
- lndrobot:/home/lnd/.lnd
|
|
- lndrobot:/root/.lnd
|
|
command:
|
|
--noseedbackup
|
|
--nobootstrap
|
|
--restlisten=localhost:8080
|
|
--no-rest-tls
|
|
--debuglevel=debug
|
|
--maxpendingchannels=10
|
|
--rpclisten=0.0.0.0:10010
|
|
--listen=0.0.0.0:9736
|
|
--color=#4126a7
|
|
--alias=Robot
|
|
--bitcoin.active
|
|
--bitcoin.regtest
|
|
--bitcoin.node=bitcoind
|
|
--bitcoind.rpchost=127.0.0.1
|
|
--bitcoind.rpcuser=test
|
|
--bitcoind.rpcpass=test
|
|
--bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
|
|
--bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
|
|
--protocol.wumbo-channels
|
|
depends_on:
|
|
- bitcoind
|
|
network_mode: service:bitcoind
|
|
|
|
redis:
|
|
image: redis:${REDIS_VERSION:-7.2.1}-alpine
|
|
container_name: test-redis
|
|
restart: always
|
|
volumes:
|
|
- redisdata:/data
|
|
network_mode: service:bitcoind
|
|
|
|
coordinator:
|
|
build:
|
|
context: .
|
|
args:
|
|
DEVELOPMENT: True
|
|
image: backend-image
|
|
container_name: test-coordinator
|
|
restart: always
|
|
environment:
|
|
DEVELOPMENT: True
|
|
TESTING: True
|
|
USE_TOR: False
|
|
MACAROON_PATH: 'data/chain/bitcoin/regtest/admin.macaroon'
|
|
CLN_DIR: '/cln/regtest/'
|
|
BITCOIND_RPCURL: 'http://127.0.0.1:18443'
|
|
BITCOIND_RPCUSER: 'test'
|
|
BITCOIND_RPCPASSWORD: 'test'
|
|
env_file:
|
|
- ${ROBOSATS_ENVS_FILE}
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
network_mode: service:bitcoind
|
|
volumes:
|
|
- .:/usr/src/robosats
|
|
- lnd:/lnd
|
|
- lndrobot:/lndrobot
|
|
- cln:/cln
|
|
healthcheck:
|
|
test: ["CMD", "curl", "localhost:8000"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
postgres:
|
|
image: postgres:${POSTGRES_VERSION:-14.2}-alpine
|
|
container_name: test-sql
|
|
restart: always
|
|
environment:
|
|
POSTGRES_PASSWORD: 'example'
|
|
POSTGRES_USER: 'postgres'
|
|
POSTGRES_DB: 'postgres'
|
|
network_mode: service:bitcoind
|
|
|
|
# celery-worker:
|
|
# image: backend-image
|
|
# pull_policy: never
|
|
# container_name: test-celery-worker
|
|
# restart: always
|
|
# environment:
|
|
# DEVELOPMENT: True
|
|
# TESTING: True
|
|
# USE_TOR: False
|
|
# MACAROON_PATH: 'data/chain/bitcoin/regtest/admin.macaroon'
|
|
# CLN_DIR: '/cln/regtest/'
|
|
# BITCOIND_RPCURL: 'http://127.0.0.1:18443'
|
|
# BITCOIND_RPCUSER: 'test'
|
|
# BITCOIND_RPCPASSWORD: 'test'
|
|
# SKIP_COLLECT_STATIC: "true"
|
|
# env_file:
|
|
# - ${ROBOSATS_ENVS_FILE}
|
|
# volumes:
|
|
# - .:/usr/src/robosats
|
|
# - lnd:/lnd
|
|
# - cln:/cln
|
|
# command: celery -A robosats worker --loglevel=INFO --concurrency 2 --max-tasks-per-child=4 --max-memory-per-child=200000
|
|
# depends_on:
|
|
# - redis
|
|
# network_mode: service:bitcoind
|
|
|
|
strfry:
|
|
image: dockurr/strfry:0.9.6
|
|
container_name: test-strfry
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./tests/strfry/db:/app/strfry-db
|
|
- ./tests/strfry/config/strfry.conf:/etc/strfry.conf:r
|
|
network_mode: service:bitcoind
|
|
|
|
volumes:
|
|
redisdata:
|
|
bitcoin:
|
|
lnd:
|
|
cln:
|
|
lndrobot: |