From 04442f537edd382366dfdc5b67334b004d0490db Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 11 Dec 2018 20:23:25 +0900 Subject: [PATCH] Add spark integration --- Production/nginx.tmpl | 9 +++++---- .../docker-fragments/bitcoin-clightning.yml | 19 ++++++++++++++++++- .../docker-fragments/btcpayserver.yml | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/Production/nginx.tmpl b/Production/nginx.tmpl index 147820b..8691739 100644 --- a/Production/nginx.tmpl +++ b/Production/nginx.tmpl @@ -309,10 +309,6 @@ server { proxy_pass http://lnd_bitcoin:8080/; } {{ end }} - {{ end }} - - {{ range $container := $ }} - {{ $serviceName := (index $container.Labels "com.docker.compose.service") }} {{ if (eq $serviceName "btcqbo") }} location /btcqbo/ { proxy_pass http://btcqbo:8001; @@ -320,6 +316,11 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + {{ end }} + {{ if (eq $serviceName "clightning_bitcoin_spark") }} + location /spark/btc/ { + proxy_pass http://clightning_bitcoin_spark:9737/; } {{ end }} {{ end }} diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 05a3db6..8e0a29c 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -27,12 +27,29 @@ services: links: - nbxplorer - bitcoind + clightning_bitcoin_spark: + image: shesek/spark-wallet:0.2.0-WIP + stop_signal: SIGKILL + restart: unless-stopped + environment: + NETWORK: ${NBITCOIN_NETWORK:-regtest} + SPARK_OPT: --no-tls -C /data/.cookie + volumes: + - "clightning_bitcoin_datadir:/etc/lightning" + - "clightning_bitcoin_spark:/data" + links: + - clightning_bitcoin + expose: + - "9737" btcpayserver: environment: BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc" + BTCPAY_BTCEXTERNALSPARK: "server=${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}${BTCPAY_ROOTPATH:-/}spark/btc;cookiefile=/etc/clightning_bitcoin_spark/.cookie" volumes: - "clightning_bitcoin_datadir:/etc/clightning_bitcoin" + - "clightning_bitcoin_spark:/etc/clightning_bitcoin_spark" links: - clightning_bitcoin volumes: - clightning_bitcoin_datadir: \ No newline at end of file + clightning_bitcoin_datadir: + clightning_bitcoin_spark: \ No newline at end of file diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 5d15c4a..46bdfca 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.28} + image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.29} expose: - "49392" environment: