Browse Source

Simplify deployment by using only one nbxplorer for several crypto currencies, remove some settings

migrate-pregen
nicolas.dorier 7 years ago
parent
commit
3a4259ea71
  1. 8
      Production/README.md
  2. 50
      Production/docker-compose.btc-ltc.yml
  3. 19
      Production/docker-compose.btc.yml
  4. 18
      Production/docker-compose.yml
  5. 5
      Regtest/docker-compose.yml

8
Production/README.md

@ -4,7 +4,7 @@ The `docker-compose` can be used for production purpose.
It is composed of: It is composed of:
1. A full node (Bitcoin Core) 1. One full node per supported cryptocurrency (bitcoind/litecoind)
2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer)) 2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer))
3. A [BTCPay Server](https://github.com/btcpayserver/btcpayserver) 3. A [BTCPay Server](https://github.com/btcpayserver/btcpayserver)
4. A database (Postgres) 4. A database (Postgres)
@ -20,12 +20,6 @@ The relevant environment variables are:
* `NBITCOIN_NETWORK`: the blockchain identifier used by NBitcoin (eg., `regtest`, `testnet`, `mainnet`) * `NBITCOIN_NETWORK`: the blockchain identifier used by NBitcoin (eg., `regtest`, `testnet`, `mainnet`)
* `BTCPAY_HOST`: the external url used to access the NGINX server from internet. This domain name must point to this machine for Let's Encrypt to create your certificate. (typically with a CNAME or A record) * `BTCPAY_HOST`: the external url used to access the NGINX server from internet. This domain name must point to this machine for Let's Encrypt to create your certificate. (typically with a CNAME or A record)
* `LETSENCRYPT_EMAIL`: The email Let's Encrypt will use to notify you about certificate expiration. * `LETSENCRYPT_EMAIL`: The email Let's Encrypt will use to notify you about certificate expiration.
* `BITCOIND_COOKIEFILE`: The relative path to RPC cookie file from bitcoin's data directory. (`.cookie` for mainnet, `regtest/.cookie` for regtest, `testnet3/.cookie` for testnet)
* `BITCOIND_NETWORKPARAMETER`: The blockchain identifier parameter used by bitcoind (`regtest=1` for regtest, `testnet=1` for testnet, `#mainnet=1` for mainnet)
* `ACME_CA_URI`: Let's encrypt API endpoint (`https://acme-staging.api.letsencrypt.org/directory` for a staging certificate, `https://acme-v01.api.letsencrypt.org/directory` for a production one) * `ACME_CA_URI`: Let's encrypt API endpoint (`https://acme-staging.api.letsencrypt.org/directory` for a staging certificate, `https://acme-v01.api.letsencrypt.org/directory` for a production one)
If using litecoin:
* `LITECOIND_COOKIEFILE`: The relative path to RPC cookie file from litecoin's data directory. (`.cookie` for mainnet, `regtest/.cookie` for regtest, `testnet4/.cookie` for testnet)
Any unset or empty environment variable will be set for a `regtest` deployment. Any unset or empty environment variable will be set for a `regtest` deployment.

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

@ -52,15 +52,16 @@ services:
btcpayserver: btcpayserver:
restart: always restart: always
image: nicolasdorier/btcpayserver:1.0.0.64 image: nicolasdorier/btcpayserver:1.0.0.69
expose: expose:
- "49392" - "49392"
environment: environment:
# BTCPay settings # BTCPay settings
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_BTCEXPLORERURL: http://nbxplorer-btc:32838/ BTCPAY_CHAINS: "btc,ltc"
BTCPAY_LTCEXPLORERURL: http://nbxplorer-ltc:32838/ BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/ BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/
@ -74,29 +75,32 @@ services:
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-yourname@example.com} LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-yourname@example.com}
links: links:
- nbxplorer-btc - nbxplorer
- nbxplorer-ltc
- postgres - postgres
volumes: volumes:
- "btcpay_datadir:/datadir" - "btcpay_datadir:/datadir"
- "nbxplorer_btc_datadir:/root/.nbxplorer"
nbxplorer-btc: nbxplorer:
restart: always restart: always
image: nicolasdorier/nbxplorer:1.0.0.45 image: nicolasdorier/nbxplorer:1.0.0.54
expose: expose:
- "32838" - "32838"
environment: environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest} NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_RPCURL: http://bitcoind:43782/ NBXPLORER_CHAINS: "btc,ltc"
NBXPLORER_RPCCOOKIEFILE: /btc/${BITCOIND_COOKIEFILE:-regtest/.cookie} NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_NODEENDPOINT: bitcoind:39388 NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
NBXPLORER_LTCRPCURL: http://litecoind:43782/
NBXPLORER_LTCNODEENDPOINT: litecoind:39388
NBXPLORER_BIND: 0.0.0.0:32838 NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_NOAUTH: 1
links: links:
- bitcoind - bitcoind
- litecoind
volumes: volumes:
- "nbxplorer_btc_datadir:/datadir" - "nbxplorer_btc_datadir:/datadir"
- "bitcoin_btc_datadir:/btc" - "bitcoin_btc_datadir:/root/.bitcoin"
- "bitcoin_ltc_datadir:/root/.litecoin"
bitcoind: bitcoind:
restart: always restart: always
@ -105,7 +109,7 @@ services:
environment: environment:
BITCOIN_EXTRA_ARGS: | BITCOIN_EXTRA_ARGS: |
rpcport=43782 rpcport=43782
${BITCOIND_NETWORKPARAMETER:-regtest=1} ${NBITCOIN_NETWORK:-regtest}=1
port=39388 port=39388
whitelist=0.0.0.0/0 whitelist=0.0.0.0/0
expose: expose:
@ -119,24 +123,6 @@ services:
volumes: volumes:
- "postgres_datadir:/var/lib/postgresql/data" - "postgres_datadir:/var/lib/postgresql/data"
nbxplorer-ltc:
restart: always
image: nicolasdorier/nbxplorer:1.0.0.45
expose:
- "32838"
environment:
NBXPLORER_NETWORK: litecoin-${NBITCOIN_NETWORK:-regtest}
NBXPLORER_RPCURL: http://litecoind:43782/
NBXPLORER_RPCCOOKIEFILE: /ltc/${LITECOIND_COOKIEFILE:-regtest/.cookie}
NBXPLORER_NODEENDPOINT: litecoind:39388
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_NOAUTH: 1
links:
- litecoind
volumes:
- "nbxplorer_ltc_datadir:/datadir"
- "bitcoin_ltc_datadir:/ltc"
litecoind: litecoind:
restart: always restart: always
container_name: btcpayserver_litecoind container_name: btcpayserver_litecoind
@ -144,7 +130,7 @@ services:
environment: environment:
BITCOIN_EXTRA_ARGS: | BITCOIN_EXTRA_ARGS: |
rpcport=43782 rpcport=43782
${BITCOIND_NETWORKPARAMETER:-regtest=1} ${NBITCOIN_NETWORK:-regtest}=1
port=39388 port=39388
whitelist=0.0.0.0/0 whitelist=0.0.0.0/0
expose: expose:

19
Production/docker-compose.btc.yml

@ -1,6 +1,7 @@
version: "3" version: "3"
# This run BTCPay behind NGINX reverse proxy configured with Let's Encrypt # This run BTCPay behind NGINX reverse proxy configured with Let's Encrypt
# Same as docker-compose.btc.yml keeping for not breaking legacy docker-azure users
services: services:
nginx: nginx:
@ -52,16 +53,15 @@ services:
btcpayserver: btcpayserver:
restart: always restart: always
image: nicolasdorier/btcpayserver:1.0.0.64 image: nicolasdorier/btcpayserver:1.0.0.69
expose: expose:
- "49392" - "49392"
environment: environment:
# BTCPay settings # BTCPay settings
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_EXPLORERURL: http://nbxplorer:32838/ BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_INTERNALURL: http://btcpayserver:49392/
BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/ BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/
# NGINX settings # NGINX settings
@ -78,24 +78,23 @@ services:
- postgres - postgres
volumes: volumes:
- "btcpay_datadir:/datadir" - "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
nbxplorer: nbxplorer:
restart: always restart: always
image: nicolasdorier/nbxplorer:1.0.0.45 image: nicolasdorier/nbxplorer:1.0.0.54
expose: expose:
- "32838" - "32838"
environment: environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest} NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_RPCURL: http://bitcoind:43782/ NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_RPCCOOKIEFILE: /btc/${BITCOIND_COOKIEFILE:-regtest/.cookie} NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
NBXPLORER_NODEENDPOINT: bitcoind:39388
NBXPLORER_BIND: 0.0.0.0:32838 NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_NOAUTH: 1
links: links:
- bitcoind - bitcoind
volumes: volumes:
- "nbxplorer_datadir:/datadir" - "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/btc" - "bitcoin_datadir:/root/.bitcoin"
bitcoind: bitcoind:
restart: always restart: always
@ -104,7 +103,7 @@ services:
environment: environment:
BITCOIN_EXTRA_ARGS: | BITCOIN_EXTRA_ARGS: |
rpcport=43782 rpcport=43782
${BITCOIND_NETWORKPARAMETER:-regtest=1} ${NBITCOIN_NETWORK:-regtest}=1
port=39388 port=39388
whitelist=0.0.0.0/0 whitelist=0.0.0.0/0
expose: expose:

18
Production/docker-compose.yml

@ -53,16 +53,15 @@ services:
btcpayserver: btcpayserver:
restart: always restart: always
image: nicolasdorier/btcpayserver:1.0.0.64 image: nicolasdorier/btcpayserver:1.0.0.69
expose: expose:
- "49392" - "49392"
environment: environment:
# BTCPay settings # BTCPay settings
BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest}
BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest}
BTCPAY_EXPLORERURL: http://nbxplorer:32838/ BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_INTERNALURL: http://btcpayserver:49392/
BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/ BTCPAY_EXTERNALURL: https://${BTCPAY_HOST}/
# NGINX settings # NGINX settings
@ -79,24 +78,23 @@ services:
- postgres - postgres
volumes: volumes:
- "btcpay_datadir:/datadir" - "btcpay_datadir:/datadir"
- "nbxplorer_datadir:/root/.nbxplorer"
nbxplorer: nbxplorer:
restart: always restart: always
image: nicolasdorier/nbxplorer:1.0.0.45 image: nicolasdorier/nbxplorer:1.0.0.54
expose: expose:
- "32838" - "32838"
environment: environment:
NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest} NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest}
NBXPLORER_RPCURL: http://bitcoind:43782/ NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_RPCCOOKIEFILE: /btc/${BITCOIND_COOKIEFILE:-regtest/.cookie} NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
NBXPLORER_NODEENDPOINT: bitcoind:39388
NBXPLORER_BIND: 0.0.0.0:32838 NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_NOAUTH: 1
links: links:
- bitcoind - bitcoind
volumes: volumes:
- "nbxplorer_datadir:/datadir" - "nbxplorer_datadir:/datadir"
- "bitcoin_datadir:/btc" - "bitcoin_datadir:/root/.bitcoin"
bitcoind: bitcoind:
restart: always restart: always
@ -105,7 +103,7 @@ services:
environment: environment:
BITCOIN_EXTRA_ARGS: | BITCOIN_EXTRA_ARGS: |
rpcport=43782 rpcport=43782
${BITCOIND_NETWORKPARAMETER:-regtest=1} ${NBITCOIN_NETWORK:-regtest}=1
port=39388 port=39388
whitelist=0.0.0.0/0 whitelist=0.0.0.0/0
expose: expose:

5
Regtest/docker-compose.yml

@ -3,7 +3,7 @@ version: "3"
services: services:
btcpayserver: btcpayserver:
image: nicolasdorier/btcpayserver:1.0.0.64 image: nicolasdorier/btcpayserver:1.0.0.69
ports: ports:
- 8080:49392 - 8080:49392
expose: expose:
@ -13,13 +13,12 @@ services:
BTCPAY_NETWORK: regtest BTCPAY_NETWORK: regtest
BTCPAY_EXPLORERURL: http://nbxplorer:32838/ BTCPAY_EXPLORERURL: http://nbxplorer:32838/
BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_BIND: 0.0.0.0:49392
BTCPAY_INTERNALURL: http://btcpayserver:49392/
links: links:
- nbxplorer - nbxplorer
- postgres - postgres
nbxplorer: nbxplorer:
image: nicolasdorier/nbxplorer:1.0.0.45 image: nicolasdorier/nbxplorer:1.0.0.54
expose: expose:
- "32838" - "32838"
environment: environment:

Loading…
Cancel
Save