Andrew Camilleri
8c31236251
|
6 years ago | |
---|---|---|
.. | ||
Production.png | 6 years ago | |
README.md | 6 years ago | |
docker-compose.btc-clightning.yml | 6 years ago | |
docker-compose.btc-ltc-clightning.yml | 6 years ago | |
docker-compose.btc-ltc.yml | 6 years ago | |
docker-compose.btc.yml | 6 years ago | |
docker-compose.ltc-clightning.yml | 6 years ago | |
docker-compose.ltc.yml | 6 years ago | |
traefik.toml | 6 years ago |
README.md
About those docker-compose
All docker-compose
files in Production, Production-NoReverseProxy and Production-Traefik are generated by running the build-pregen.sh (or build-pregen.ps1) script from the fragments located in docker-compose-generator/docker-fragments.
The pre-generated docker-compose
files only cover btc
, ltc
, clightning
with traefik
.
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 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:
- One full node per supported cryptocurrency (bitcoind/litecoind)
- A lightweight block explorer (NBxplorer)
- A BTCPay Server
- A database (Postgres)
- A reverse proxy (Traefik) xontainer that also handles SSL certificate renewal
The Deploy on Azure Button is using this docker-compose
under the hood on an Ubuntu machine. You can use it on any docker supporting host.
The relevant environment variables are:
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_ROOTPATH
: The root path directory where BTCPay is accessed, more information below. (default: /)LETSENCRYPT_EMAIL
: The email Let's Encrypt will use to notify you about certificate expiration.LIGHTNING_ALIAS
: Optional, if using the integrated lightning feature, customize the alias of your nodesBTCPAY_SSHKEYFILE
: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server (You need to copy the key file on BTCPay's datadir volume)BTCPAY_SSHTRUSTEDFINGERPRINTS
: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host public's key against those fingerprints
If BTCPAY_HOST
is btcpay.example.com
and BTCPAY_ROOTPATH
is /btcpay
, then you can access the site via https://btcpay.example.com/btcpay
Use docker-compose.btc-ltc.yml
for bitcoin and litecoin support, or docker-compose.btc.yml
for only bitcoin.
Any unset or empty environment variable will be set for a regtest
deployment.
The ports mapped on the host are:
80
for Let's encrypt443
for the website9735
for the bitcoin lightning network node (if used)9736
for the litecoin lightning network node (if used)
Example for running on mainnet
:
For linux:
docker-compose up \
-e "NBITCOIN_NETWORK=mainnet" \
-e "BTCPAY_HOST=btcpay.example.com" \
-e "LETSENCRYPT_EMAIL=me@example.com"
For powershell:
docker-compose up `
-e "NBITCOIN_NETWORK=mainnet" `
-e "BTCPAY_HOST=btcpay.example.com" `
-e "LETSENCRYPT_EMAIL=me@example.com"
See also The guide for docker noobs.
Make sure the domain btcpay.example.com
point to your server and that port 80
and 443
are open.