Browse Source

Merge remote-tracking branch 'origin/master' into feature/traefik

feature/auto_ssh
Andrew Camilleri 6 years ago
parent
commit
6b4fead76e
  1. 15
      Production-NoReverseProxy/README.md
  2. 95
      Production-NoReverseProxy/docker-compose.btc-clightning.yml
  3. 145
      Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml
  4. 87
      Production-NoReverseProxy/docker-compose.btc-ltc.yml
  5. 66
      Production-NoReverseProxy/docker-compose.btc.yml
  6. 95
      Production-NoReverseProxy/docker-compose.ltc-clightning.yml
  7. 66
      Production-NoReverseProxy/docker-compose.ltc.yml
  8. 18
      Production/README.md
  9. 147
      Production/docker-compose.btc-clightning.yml
  10. 197
      Production/docker-compose.btc-ltc-clightning.yml
  11. 139
      Production/docker-compose.btc-ltc.yml
  12. 118
      Production/docker-compose.btc.yml
  13. 147
      Production/docker-compose.ltc-clightning.yml
  14. 118
      Production/docker-compose.ltc.yml
  15. 5
      README.md
  16. 2
      bitcoin-lncli.ps1
  17. 2
      bitcoin-lncli.sh
  18. 51
      btcpay-setup.sh
  19. 5
      btcpay-update.sh
  20. 8
      build-pregen.ps1
  21. 9
      build-pregen.sh
  22. 2
      docker-compose-generator/docker-fragments/bitcoin-clightning.yml
  23. 10
      docker-compose-generator/docker-fragments/bitcoin-lnd.yml
  24. 2
      docker-compose-generator/docker-fragments/btcpayserver.yml
  25. 2
      docker-compose-generator/docker-fragments/feathercoin.yml
  26. 2
      docker-compose-generator/docker-fragments/litecoin-clightning.yml
  27. 11
      docker-compose-generator/docker-fragments/litecoin-lnd.yml
  28. 88
      docker-compose-generator/src/Program.cs
  29. 2
      litecoin-lncli.ps1
  30. 2
      litecoin-lncli.sh

15
Production-NoReverseProxy/README.md

@ -1,17 +1,4 @@
# About those pre-generated docker-compose
All `docker-compose` files in [Production](Production), [Production-NoReverseProxy](Production-NoReverseProxy) and [Production-Traefik](Production-Traefik) are generated by running the [build-pregen.sh](build-pregen.sh) (or [build-pregen.ps1](build-pregen.ps1)) script from the fragments located in [docker-compose-generator/docker-fragments](docker-compose-generator/docker-fragments).
The pre-generated `docker-compose` files only cover `btc`, `ltc`, `clightning` without reverse proxy.
---
We strongly advise you to not use the pre-generated docker-compose of this folder, they are deprecated and kept only for backward compatibility.
Instead use the [build.sh](../build.sh) as documented in (README)(../Readme.md) to generate a docker-compose which fit your needs.
---
This `docker-compose` files can be used for production purpose.
# How to use docker-compose without reverse proxy
![Architecture](https://github.com/btcpayserver/btcpayserver-doc/raw/master/img/Architecture.png)

95
Production-NoReverseProxy/docker-compose.btc-clightning.yml

@ -1,95 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_bitcoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/root/.bitcoin"
links:
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
clightning_bitcoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: btc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
announce-addr=${BTCPAY_HOST}:9735
bind-addr=0.0.0.0:9735
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=btc
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9735:9735"
links:
- nbxplorer
- bitcoind
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
bitcoin_datadir:
clightning_bitcoin_datadir:

145
Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml

@ -1,145 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc,btc"
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_litecoin
- clightning_bitcoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc,btc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
- "bitcoin_datadir:/root/.bitcoin"
links:
- litecoind
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
clightning_litecoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: ltc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/litecoin
bitcoin-rpcconnect=litecoind
bind-addr=0.0.0.0:9735
announce-addr=${BTCPAY_HOST}:9736
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=ltc
volumes:
- "clightning_litecoin_datadir:/root/.lightning"
- "litecoin_datadir:/etc/litecoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9736:9735"
links:
- nbxplorer
- litecoind
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
clightning_bitcoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: btc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
announce-addr=${BTCPAY_HOST}:9735
bind-addr=0.0.0.0:9735
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=btc
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9735:9735"
links:
- nbxplorer
- bitcoind
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
clightning_litecoin_datadir:
bitcoin_datadir:
clightning_bitcoin_datadir:

87
Production-NoReverseProxy/docker-compose.btc-ltc.yml

@ -1,87 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc,btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc,btc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
- "bitcoin_datadir:/root/.bitcoin"
links:
- litecoind
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
bitcoin_datadir:

66
Production-NoReverseProxy/docker-compose.btc.yml

@ -1,66 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/root/.bitcoin"
links:
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
bitcoin_datadir:

95
Production-NoReverseProxy/docker-compose.ltc-clightning.yml

@ -1,95 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc"
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_litecoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
links:
- litecoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
clightning_litecoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: ltc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/litecoin
bitcoin-rpcconnect=litecoind
bind-addr=0.0.0.0:9735
announce-addr=${BTCPAY_HOST}:9736
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=ltc
volumes:
- "clightning_litecoin_datadir:/root/.lightning"
- "litecoin_datadir:/etc/litecoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9736:9735"
links:
- nbxplorer
- litecoind
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
clightning_litecoin_datadir:

66
Production-NoReverseProxy/docker-compose.ltc.yml

@ -1,66 +0,0 @@
version: "3"
services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc"
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "80:49392"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
links:
- litecoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
volumes:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:

18
Production/README.md

@ -1,19 +1,7 @@
# About those docker-compose
# How to use docker-compose with NGinx
All `docker-compose` files in [Production](Production) and [Production-NoReverseProxy](Production-NoReverseProxy) are generated by running the [build-pregen.sh](build-pregen.sh) (or [build-pregen.ps1](build-pregen.ps1)) script from the fragments located in [docker-compose-generator/docker-fragments](docker-compose-generator/docker-fragments).
The pre-generated `docker-compose` files only cover `btc`, `ltc`, `clightning` with `nginx`.
---
We strongly advise you to not use the pre-generated docker-compose of this folder, they are deprecated and kept only for backward compatibility.
Instead use the [build.sh](../build.sh) as documented in (README)(../Readme.md) to generate a docker-compose which fit your needs.
---
The `docker-compose` can be used for production purpose.
It is composed of:
NGinx acts as a reverse proxy, and take care of renewing HTTPS certificates for you.
BTCPay Server deployment using NGinx are typically composed of:
1. One full node per supported cryptocurrency (bitcoind/litecoind)
2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer))

147
Production/docker-compose.btc-clightning.yml

@ -1,147 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_bitcoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/root/.bitcoin"
links:
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
clightning_bitcoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: btc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
announce-addr=${BTCPAY_HOST}:9735
bind-addr=0.0.0.0:9735
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=btc
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9735:9735"
links:
- nbxplorer
- bitcoind
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
bitcoin_datadir:
clightning_bitcoin_datadir:

197
Production/docker-compose.btc-ltc-clightning.yml

@ -1,197 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc,btc"
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_litecoin
- clightning_bitcoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc,btc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
- "bitcoin_datadir:/root/.bitcoin"
links:
- litecoind
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
clightning_litecoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: ltc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/litecoin
bitcoin-rpcconnect=litecoind
bind-addr=0.0.0.0:9735
announce-addr=${BTCPAY_HOST}:9736
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=ltc
volumes:
- "clightning_litecoin_datadir:/root/.lightning"
- "litecoin_datadir:/etc/litecoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9736:9735"
links:
- nbxplorer
- litecoind
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
clightning_bitcoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: btc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
announce-addr=${BTCPAY_HOST}:9735
bind-addr=0.0.0.0:9735
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=btc
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9735:9735"
links:
- nbxplorer
- bitcoind
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
clightning_litecoin_datadir:
bitcoin_datadir:
clightning_bitcoin_datadir:

139
Production/docker-compose.btc-ltc.yml

@ -1,139 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc,btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc,btc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
- "bitcoin_datadir:/root/.bitcoin"
links:
- litecoind
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
bitcoin_datadir:

118
Production/docker-compose.btc.yml

@ -1,118 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/root/.bitcoin"
links:
- bitcoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
bitcoin_datadir:

147
Production/docker-compose.ltc-clightning.yml

@ -1,147 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc"
BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
links:
- nbxplorer
- postgres
- clightning_litecoin
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
- "clightning_litecoin_datadir:/etc/clightning_litecoin"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
links:
- litecoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
clightning_litecoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: ltc
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/litecoin
bitcoin-rpcconnect=litecoind
bind-addr=0.0.0.0:9735
announce-addr=${BTCPAY_HOST}:9736
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=ltc
volumes:
- "clightning_litecoin_datadir:/root/.lightning"
- "litecoin_datadir:/etc/litecoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9736:9735"
links:
- nbxplorer
- litecoind
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:
clightning_litecoin_datadir:

118
Production/docker-compose.ltc.yml

@ -1,118 +0,0 @@
version: "3"
services:
nginx:
restart: unless-stopped
image: nginx:stable
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
links:
- btcpayserver
nginx-gen:
restart: unless-stopped
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:ro"
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
links:
- nginx
letsencrypt-nginx-proxy-companion:
restart: unless-stopped
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "nginx_conf:/etc/nginx/conf.d"
- "nginx_vhost:/etc/nginx/vhost.d"
- "nginx_html:/usr/share/nginx/html"
- "nginx_certs:/etc/nginx/certs:rw"
environment:
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
NGINX_PROXY_CONTAINER: "nginx"
ACME_CA_URI: ${ACME_CA_URI:-https://acme-staging.api.letsencrypt.org/directory}
links:
- nginx-gen
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
expose:
- "49392"
environment:
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/
BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/}
BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS}
BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE}
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST}
SSL_POLICY: Mozilla-Modern
LETSENCRYPT_HOST: ${BTCPAY_HOST}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "ltc"
links:
- nbxplorer
- postgres
volumes:
- "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
nbxplorer:
restart: unless-stopped
image: nicolasdorier/nbxplorer:1.0.2.31
expose:
- "32838"
environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_CHAINS: "ltc"
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
volumes:
- "nbxplorer_datadir:/datadir"
- "litecoin_datadir:/root/.litecoin"
links:
- litecoind
postgres:
restart: unless-stopped
image: postgres:9.6.5
volumes:
- "postgres_datadir:/var/lib/postgresql/data"
litecoind:
restart: unless-stopped
container_name: btcpayserver_litecoind
image: nicolasdorier/docker-litecoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "litecoin_datadir:/data"
volumes:
nginx_conf:
nginx_vhost:
nginx_html:
nginx_certs:
btcpay_datadir:
nbxplorer_datadir:
postgres_datadir:
litecoin_datadir:

5
README.md

@ -306,9 +306,12 @@ Yes, run the following commands to update:
```bash
sudo su -
btcpay-update.sh
cd $DOWNLOAD_ROOT/btcpayserver-docker
git checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19
btcpay-update.sh
. ./btcpay-setup.sh -i
git checkout master
btcpay-update.sh
exit
```

2
bitcoin-lncli.ps1

@ -1 +1 @@
docker exec -ti btcpayserver_lnd_bitcoin lncli $args
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon $args

2
bitcoin-lncli.sh

@ -1,3 +1,3 @@
#!/bin/bash
docker exec -ti btcpayserver_lnd_bitcoin lncli "$@"
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"

51
btcpay-setup.sh

@ -71,56 +71,9 @@ fi
######### Migration: old pregen environment to new environment ############
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
echo "Old pregen docker deployment detected. Migrating..."
rm "$DOWNLOAD_ROOT/btcpay-restart.sh"
rm "$DOWNLOAD_ROOT/btcpay-update.sh"
rm "$DOWNLOAD_ROOT/changedomain.sh"
rm "$DOWNLOAD_ROOT/entrypoint.sh"
DOWNLOAD_ROOT=""
BTCPAYGEN_OLD_PREGEN="true"
# Migration: old deployment store those in BTCPAY_ENV_FILE
BTCPAY_HOST=$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')
ACME_CA_URI=$(cat $BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')
NBITCOIN_NETWORK=$(cat $BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')
LETSENCRYPT_EMAIL=$(cat $BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')
LIGHTNING_ALIAS=$(cat $BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production ]]; then
BTCPAYGEN_REVERSEPROXY='nginx'
fi
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production-Traefik ]]; then
BTCPAYGEN_REVERSEPROXY='traefik'
fi
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production-NoReverseProxy ]]; then
BTCPAYGEN_REVERSEPROXY='none'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc.yml ]]; then
BTCPAYGEN_CRYPTO1='btc'
BTCPAYGEN_LIGHTNING='none'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-clightning.yml ]]; then
BTCPAYGEN_CRYPTO1='btc'
BTCPAYGEN_LIGHTNING='clightning'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.ltc.yml ]]; then
BTCPAYGEN_CRYPTO1='ltc'
BTCPAYGEN_LIGHTNING='none'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.ltc-clightning.yml ]]; then
BTCPAYGEN_CRYPTO1='ltc'
BTCPAYGEN_LIGHTNING='clightning'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-ltc.yml ]]; then
BTCPAYGEN_CRYPTO1='btc'
BTCPAYGEN_CRYPTO2='ltc'
BTCPAYGEN_LIGHTNING='none'
fi
if [[ $BTCPAY_DOCKER_COMPOSE == *docker-compose.btc-ltc-clightning.yml ]]; then
BTCPAYGEN_CRYPTO1='btc'
BTCPAYGEN_CRYPTO2='ltc'
BTCPAYGEN_LIGHTNING='clightning'
fi
echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
return
fi
#########################################################

5
btcpay-update.sh

@ -4,6 +4,11 @@ set -e
. /etc/profile.d/btcpay-env.sh
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system"
exit
fi
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
git pull --force

8
build-pregen.ps1

@ -1,8 +0,0 @@
# This script will run docker-compose-generator in a container to generate the yml files
docker pull btcpayserver/docker-compose-generator
docker run -v "$(Get-Location)\Production:/app/Production" `
-v "$(Get-Location)\Production-NoReverseProxy:/app/Production-NoReverseProxy" `
-v "$(Get-Location)\Production-Traefik:/app/Production-Traefik" `
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
--rm btcpayserver/docker-compose-generator pregen

9
build-pregen.sh

@ -1,9 +0,0 @@
#!/bin/bash
# This script will run docker-compose-generator in a container to generate the yml files
docker pull btcpayserver/docker-compose-generator
docker run -v "$(pwd)/Production:/app/Production" \
-v "$(pwd)/Production-NoReverseProxy:/app/Production-NoReverseProxy" \
-v "$(pwd)/Production-Traefik:/app/Production-Traefik" \
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
--rm btcpayserver/docker-compose-generator pregen

2
docker-compose-generator/docker-fragments/bitcoin-clightning.yml

@ -2,7 +2,7 @@ version: "3"
services:
clightning_bitcoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
image: nicolasdorier/clightning:v0.6.1
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:

10
docker-compose-generator/docker-fragments/bitcoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services:
lnd_bitcoin:
image: btcpayserver/lnd:0.4.2.0.1
image: btcpayserver/lnd:0.5-beta
container_name: btcpayserver_lnd_bitcoin
restart: unless-stopped
environment:
@ -15,10 +15,12 @@ services:
rpclisten=0.0.0.0:10009
bitcoin.node=bitcoind
bitcoind.rpchost=bitcoind:43782
bitcoind.zmqpath=tcp://bitcoind:28332
bitcoind.zmqpubrawblock=tcp://bitcoind:28332
bitcoind.zmqpubrawtx=tcp://bitcoind:28333
externalip=${BTCPAY_HOST}:9735
alias=${LIGHTNING_ALIAS}
noencryptwallet=1
adminmacaroonpath=/data/admin.macaroon
noseedbackup=1
notls=1
ports:
- "9735:9735"
@ -45,8 +47,8 @@ services:
bitcoind:
environment:
BITCOIN_EXTRA_ARGS: |
zmqpubrawtx=tcp://0.0.0.0:28332
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
expose:
- "28332"
- "28333"

2
docker-compose-generator/docker-fragments/btcpayserver.yml

@ -4,7 +4,7 @@ services:
btcpayserver:
restart: unless-stopped
image: nicolasdorier/btcpayserver:1.0.2.105
image: nicolasdorier/btcpayserver:1.0.2.106
expose:
- "49392"
environment:

2
docker-compose-generator/docker-fragments/feathercoin.yml

@ -4,7 +4,7 @@ services:
feathercoind:
restart: unless-stopped
container_name: btcpayserver_feathercoind
image: chekaz/docker-feathercoin:0.16.0
image: chekaz/docker-feathercoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782

2
docker-compose-generator/docker-fragments/litecoin-clightning.yml

@ -2,7 +2,7 @@ version: "3"
services:
clightning_litecoin:
image: nicolasdorier/clightning:634f19a7b230edc686be56ab950b80784e56252c
image: nicolasdorier/clightning:v0.6.1
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment:

11
docker-compose-generator/docker-fragments/litecoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services:
lnd_litecoin:
image: btcpayserver/lnd:0.4.2.0.1
image: btcpayserver/lnd:0.5-beta
container_name: btcpayserver_lnd_litecoin
restart: unless-stopped
environment:
@ -13,10 +13,12 @@ services:
restlisten=0.0.0.0:8080
litecoin.node=litecoind
litecoind.rpchost=litecoind:43782
litecoind.zmqpath=tcp://litecoind:28332
litecoind.zmqpubrawblock=tcp://litecoind:28332
litecoind.zmqpubrawtx=tcp://litecoind:28333
externalip=${BTCPAY_HOST}:9736
alias=${LIGHTNING_ALIAS}
noencryptwallet=1
adminmacaroonpath=/data/admin.macaroon
noseedbackup=1
notls=1
ports:
- "9736:9735"
@ -42,10 +44,11 @@ services:
litecoind:
environment:
BITCOIN_EXTRA_ARGS: |
zmqpubrawtx=tcp://0.0.0.0:28332
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
expose:
- "28332"
- "28333"
volumes:
lnd_litecoin_datadir:

88
docker-compose-generator/src/Program.cs

@ -8,59 +8,21 @@ namespace DockerGenerator
{
class Program
{
static void Main(string[] args)
{
var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? FindRoot("app")
: Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), ".."));
Dictionary<string,string> ProxyMapping = new Dictionary<string, string>()
{
{"nginx", Path.GetFullPath(Path.Combine(root, "Production"))},
{"no-reverseproxy", Path.GetFullPath(Path.Combine(root, "Production-NoReverseProxy"))},
{"traefik", Path.GetFullPath(Path.Combine(root, "Production-Traefik"))}
};
if(args.Any(a => a == "pregen"))
{
foreach(var proxy in ProxyMapping.Keys)
{
foreach(var lightning in new[] { "clightning", "" })
{
foreach(var btc in new[] { "btc", "" })
{
foreach(var ltc in new[] { "ltc", "" })
{
if(btc == "" && ltc == "")
continue;
string name = $"{btc}-{ltc}-{lightning}".Replace("--", "-");
if(name.EndsWith("-"))
name = name.Substring(0, name.Length - 1);
if(name.StartsWith("-"))
name = name.Substring(1, name.Length - 1);
var composition = new DockerComposition();
composition.SelectedCryptos = new HashSet<string>();
composition.SelectedCryptos.Add(btc);
composition.SelectedCryptos.Add(ltc);
composition.SelectedLN = lightning;
composition.SelectedProxy = proxy;
new Program().Run(composition, name, ProxyMapping[proxy]);
}
}
}
}
}
else
{
var composition = DockerComposition.FromEnvironmentVariables();
Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray()));
Console.WriteLine("Lightning: " + composition.SelectedLN);
Console.WriteLine("ReverseProxy: " + composition.SelectedProxy);
var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated"));
var composition = DockerComposition.FromEnvironmentVariables();
Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray()));
Console.WriteLine("Lightning: " + composition.SelectedLN);
Console.WriteLine("ReverseProxy: " + composition.SelectedProxy);
var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated"));
var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME");
name = string.IsNullOrEmpty(name) ? "generated" : name;
new Program().Run(composition, name, generatedLocation);
}
var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME");
name = string.IsNullOrEmpty(name) ? "generated" : name;
new Program().Run(composition, name, generatedLocation);
}
private void Run(DockerComposition composition, string name, string output)
@ -70,7 +32,7 @@ namespace DockerGenerator
fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments"));
var fragments = new List<string>();
switch (@composition.SelectedProxy)
switch (composition.SelectedProxy)
{
case "nginx":
@ -88,26 +50,26 @@ namespace DockerGenerator
fragments.Add("btcpayserver");
fragments.Add("nbxplorer");
fragments.Add("postgres");
foreach(var crypto in CryptoDefinition.GetDefinitions())
foreach (var crypto in CryptoDefinition.GetDefinitions())
{
if(!composition.SelectedCryptos.Contains(crypto.Crypto))
if (!composition.SelectedCryptos.Contains(crypto.Crypto))
continue;
fragments.Add(crypto.CryptoFragment);
if(composition.SelectedLN == "clightning" && crypto.CLightningFragment != null)
if (composition.SelectedLN == "clightning" && crypto.CLightningFragment != null)
{
fragments.Add(crypto.CLightningFragment);
}
if(composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
{
fragments.Add(crypto.LNDFragment);
}
}
if (composition.SelectedLN == "lnd" && crypto.LNDFragment != null)
{
fragments.Add(crypto.LNDFragment);
}
}
foreach(var fragment in composition.AdditionalFragments)
{
fragments.Add(fragment.Trim());
}
foreach (var fragment in composition.AdditionalFragments)
{
fragments.Add(fragment.Trim());
}
var def = new DockerComposeDefinition(name, fragments);
def.FragmentLocation = fragmentLocation;
@ -119,11 +81,11 @@ namespace DockerGenerator
{
string directory = Directory.GetCurrentDirectory();
int i = 0;
while(true)
while (true)
{
if(i > 10)
if (i > 10)
throw new DirectoryNotFoundException(rootDirectory);
if(directory.EndsWith(rootDirectory))
if (directory.EndsWith(rootDirectory))
return directory;
directory = Path.GetFullPath(Path.Combine(directory, ".."));
i++;

2
litecoin-lncli.ps1

@ -1 +1 @@
docker exec -ti btcpayserver_lnd_litecoin lncli $args
docker exec -ti btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon $args

2
litecoin-lncli.sh

@ -1,3 +1,3 @@
#!/bin/bash
docker exec -ti btcpayserver_lnd_litecoin lncli "$@"
docker exec -ti btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"

Loading…
Cancel
Save