robosats/docker-compose.yml
Reckless_Satoshi 5ff70bccb7
Add core-lightning as backend lightning node vendor (#611)
* Add CLN node backend image and service (#418)

* Add cln service

* Add hodlvoice Dockerfile and entrypoint

* Add lnnode vendor switch (#431)

* Add LNNode vendor switch

* Add CLN version to frontend and other fixes

* init

* first draft

* add unsettled_local_balance and unsettled_remote_balance

* gen_hold_invoice now takes 3 more variables to build a label for cln

* remove unneeded payment_hash from gen_hold_invoice

* remove comment

* add get_cln_version

* first draft of clns follow_send_payment

* fix name of get_lnd_version

* enable flake8

* flake8 fixes

* renaming cln file, class and get_version

* remove lnd specific commented code

* get_version: add try/except, refactor to top to mimic lnd.py

* rename htlc_cltv to htlc_expiry

* add clns lookup_invoice_status

* refactored double_check_htlc_is_settled to the end to match lnds file

* fix generate_rpc

* Add sample environmental variables, small fixes

* Fix CLN gRPC port

* Fix gen_hold_invoice, plus some other tiny fixes (#435)

* Fix channel_balance to use int object inside Amount (#438)

* Add CLN/LND volume to celery-beat service

* Add CLN/LND volume to celery-beat service

* Bump CLN to v23.05

* changes for 0.5 and some small fixes

* change invoice expiry from absolute to relative duration

* add try/except to catch timeout error

* fix failure_reason to be ln_payment failure reasons, albeit inaccurate sometimes

* refactor follow_send_payment and add pending check to expired case

* fix status comments

* add send_keysend method

* fix wrong state ints in cancel and settle

* switch to use hodlinvoicelookup in double_check

* move pay command after lnpayment status update

* remove loop in follow_send_payment and add error result for edge case

* fix typeerror for payment_hash

* rework follow_send_payment logic and payment_hash, watch harder if pending

* use fully qualified names for status instead of raw int

* missed 2 status from prev commit

* Always copy the cln-grpc-hodl plugin on start up

* Fix ALLOW_SELF_KEYSEND linting error

* Fix missing definition of failure_reason

---------

Co-authored-by: daywalker90 <admin@noserver4u.de>
2023-05-22 14:56:15 +00:00

236 lines
5.4 KiB
YAML

version: '3.9'
services:
jekyll:
image: jekyll/jekyll:4.0
container_name: pages
restart: always
volumes:
- .:/usr/src/robosats
command: bash -c "cd /usr/src/robosats/docs/
&& bundle install
&& bundle exec jekyll serve --force_polling -H 0.0.0.0 -P 4000"
ports:
- 4000:4000
redis:
image: redis:6.2.6
container_name: redis
restart: always
volumes:
- redisdata:/data
network_mode: service:tor
backend:
build: .
image: backend
container_name: django-dev
restart: always
depends_on:
- bitcoind
- lnd
- redis
environment:
DEVELOPMENT: 1
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
network_mode: service:tor
command: python3 -u manage.py runserver 0.0.0.0:8000
frontend:
build: ./frontend
container_name: npm-dev
restart: always
command: npm run dev
volumes:
- ./frontend:/usr/src/frontend
- ./mobile:/usr/src/mobile
nodeapp: # Umbrel / Citadel app
build: ./nodeapp
container_name: nodeapp-dev
restart: always
environment:
TOR_PROXY_IP: 127.0.0.1
TOR_PROXY_PORT: 9050
network_mode: service:tor
volumes:
- ./nodeapp/:/usr/src/robosats/
- ./nodeapp/nginx.conf:/etc/nginx/nginx.conf
- ./frontend/static:/usr/src/robosats/static
clean-orders:
image: backend
restart: always
container_name: clord-dev
environment:
SKIP_COLLECT_STATIC: "true"
command: python3 manage.py clean_orders
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
network_mode: service:tor
follow-invoices:
image: backend
container_name: invo-dev
restart: always
depends_on:
- bitcoind
- lnd
environment:
SKIP_COLLECT_STATIC: "true"
command: python3 manage.py follow_invoices
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
network_mode: service:tor
telegram-watcher:
image: backend
container_name: tg-dev
restart: always
environment:
SKIP_COLLECT_STATIC: "true"
command: python3 manage.py telegram_watcher
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
network_mode: service:tor
celery-worker:
image: backend
container_name: cele-worker-dev
restart: always
environment:
REDIS_URL: redis://localhost:6379
SKIP_COLLECT_STATIC: "true"
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
command: celery -A robosats worker --loglevel=INFO --concurrency 4 --max-tasks-per-child=4 --max-memory-per-child=200000
depends_on:
- redis
network_mode: service:tor
celery-beat:
image: backend
container_name: cele-beat-dev
restart: always
environment:
REDIS_URL: redis://localhost:6379
SKIP_COLLECT_STATIC: "true"
command: celery -A robosats beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- .:/usr/src/robosats
- ./node/lnd:/lnd
- ./node/cln:/cln
depends_on:
- redis
network_mode: service:tor
i2p:
image: geti2p/i2p
container_name: i2p-dev
network_mode: host
volumes:
- ./node/i2p/i2pconfig:/i2p/.i2p
tor:
build: ./docker/tor
container_name: tor-dev
restart: always
environment:
LOCAL_USER_ID: 1000
LOCAL_GROUP_ID: 1000
volumes:
- ./node/tor/data:/var/lib/tor
- ./node/tor/config:/etc/tor
ports:
- 8000:8000 # dev frontend build
- 12596:12596 # umbrel frontend
lnd:
build: ./docker/lnd
restart: always
network_mode: service:tor
container_name: lnd-dev
depends_on:
- tor
- bitcoind
volumes:
- ./node/tor/data:/var/lib/tor
- ./node/tor/config:/etc/tor
- ./node/lnd:/home/lnd/.lnd
- ./node/lnd:/root/.lnd
command: lnd
environment:
LOCAL_USER_ID: 1000
LOCAL_GROUP_ID: 1000
LND_RPC_PORT: 10009
LND_REST_PORT: 8080
AUTO_UNLOCK_PWD: ${AUTO_UNLOCK_PWD}
cln:
build: ./docker/cln
restart: always
network_mode: service:tor
container_name: cln-dev
depends_on:
- tor
- bitcoind
# - postgres-cln
volumes:
- ./node/tor/data:/var/lib/tor
- ./node/tor/config:/etc/tor
- ./node/cln:/root/.lightning
- ./node/bitcoin:/root/.bitcoin
command: lightningd
bitcoind:
build: ./docker/bitcoind
container_name: btc-dev
restart: always
environment:
LOCAL_USER_ID: 1000
LOCAL_GROUP_ID: 1000
depends_on:
- tor
network_mode: service:tor
volumes:
- ./node/tor/data:/var/lib/tor:ro
- ./node/tor/config:/etc/tor:ro
- ./node/bitcoin:/home/bitcoin/.bitcoin
postgres:
image: postgres:14.2-alpine
container_name: sql-dev
restart: always
environment:
POSTGRES_PASSWORD: example
network_mode: service:tor
volumes:
- ./node/db:/var/lib/postgresql/data
# # Postgresql for CLN
# postgres-cln:
# image: postgres:14.2-alpine
# container_name: cln-sql-dev
# restart: always
# environment:
# PGUSER: user
# PGDATABASE: cln
# POSTGRES_PASSWORD: pass
# PGPORT: 5433
# network_mode: service:tor
# volumes:
# - ./node/cln-db:/var/lib/postgresql/data
volumes:
redisdata: