mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-13 05:20:40 +02:00
update readmes
This commit is contained in:
parent
56346cc4d8
commit
0f8dc4b7c9
@ -1,6 +1,6 @@
|
|||||||
# How to use docker-compose with NGinx
|
# How to use docker-compose with NGinx
|
||||||
|
|
||||||
NGinx acts as a reverse proxy, and take care of renewing HTTPS certificates for you.
|
NGinx acts as a reverse proxy, and takes care of renewing HTTPS certificates for you.
|
||||||
BTCPay Server deployment using NGinx are typically composed of:
|
BTCPay Server deployment using NGinx are typically composed of:
|
||||||
|
|
||||||
1. One full node per supported cryptocurrency (bitcoind/litecoind)
|
1. One full node per supported cryptocurrency (bitcoind/litecoind)
|
||||||
|
@ -115,7 +115,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
|
|||||||
* `BTCPAYGEN_CRYPTO1`: First supported crypto currency (eg. `btc`, `ltc`. Default: `btc`)
|
* `BTCPAYGEN_CRYPTO1`: First supported crypto currency (eg. `btc`, `ltc`. Default: `btc`)
|
||||||
* `BTCPAYGEN_CRYPTO2`: Second supported crypto currency (eg. `btc`, `ltc`. Default: `(empty)`)
|
* `BTCPAYGEN_CRYPTO2`: Second supported crypto currency (eg. `btc`, `ltc`. Default: `(empty)`)
|
||||||
* `BTCPAYGEN_CRYPTON`: N'th supported crypto currency where N is 9 at maximum. (eg. `btc`, `ltc`. Default: `(empty)`)
|
* `BTCPAYGEN_CRYPTON`: N'th supported crypto currency where N is 9 at maximum. (eg. `btc`, `ltc`. Default: `(empty)`)
|
||||||
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `(empty)`. Default: `nginx`)
|
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `traefik`, `(empty)`. Default: `nginx`)
|
||||||
* `BTCPAYGEN_LIGHTNING`: Lightning network implementation to use (eg. `clightning`, `(empty)`)
|
* `BTCPAYGEN_LIGHTNING`: Lightning network implementation to use (eg. `clightning`, `(empty)`)
|
||||||
* `BTCPAYGEN_SUBNAME`: The subname of the generated docker-compose file, where the full name is `Generated/docker-compose.SUBNAME.yml` (Default: `generated`)
|
* `BTCPAYGEN_SUBNAME`: The subname of the generated docker-compose file, where the full name is `Generated/docker-compose.SUBNAME.yml` (Default: `generated`)
|
||||||
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Semicolon-separated list of additional fragments you want to use (eg. `opt-save-storage`)
|
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Semicolon-separated list of additional fragments you want to use (eg. `opt-save-storage`)
|
||||||
|
@ -1,71 +1,17 @@
|
|||||||
# About those docker-compose
|
# How to use docker-compose with Traefik
|
||||||
|
|
||||||
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).
|
Traefik is a modern reverse proxy aimed towards applications running through container orchestrators.
|
||||||
|
|
||||||
The pre-generated `docker-compose` files only cover `btc`, `ltc`, `clightning` with `traefik`.
|
Some of the benefits of using Traefik over NGinx are:
|
||||||
|
* Real-time configuration changes - no need to reload the proxy
|
||||||
|
* Auto discovery and configuration of services through a vast amount of container orchestrators.
|
||||||
|
* Built-in official support for Let's Encrypt SSL with certificate auto-renewal
|
||||||
|
|
||||||
---
|
## Traefik Specific Environment Variables
|
||||||
|
|
||||||
We strongly advise you to not use the pre-generated docker-compose of this folder, they are deprecated and kept only for backward compatibility.
|
* `BTCPAYGEN_REVERSEPROXY` to `traefik`.
|
||||||
Instead use the [build.sh](../build.sh) as documented in (README)(../Readme.md) to generate a docker-compose which fit your needs.
|
* `LETSENCRYPT_EMAIL`: Optional, The email Let's Encrypt will use to notify you about certificate expiration.
|
||||||
|
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: In the case that you have an already deployed traefik container, you can use the fragment `traefik-labels` which will tag the btcpayserver service with the needed labels to be discovered.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
The `docker-compose` can be used for production purpose.
|

|
||||||
|
|
||||||
It is composed of:
|
|
||||||
|
|
||||||
1. One full node per supported cryptocurrency (bitcoind/litecoind)
|
|
||||||
2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer))
|
|
||||||
3. A [BTCPay Server](https://github.com/btcpayserver/btcpayserver)
|
|
||||||
4. A database (Postgres)
|
|
||||||
5. A reverse proxy (Traefik) container that also handles SSL certificate renewal
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[The Deploy on Azure Button](https://github.com/btcpayserver/btcpayserver-azure) 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 nodes
|
|
||||||
* `BTCPAY_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`
|
|
||||||
|
|
||||||
Any unset or empty environment variable will be set for a `regtest` deployment.
|
|
||||||
|
|
||||||
The ports mapped on the host are:
|
|
||||||
|
|
||||||
1. `80` for Let's encrypt
|
|
||||||
2. `443` for the website
|
|
||||||
3. `9735` for the bitcoin lightning network node (if used)
|
|
||||||
4. `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](../README.md#fornoobs).
|
|
||||||
|
|
||||||
Make sure the domain `btcpay.example.com` point to your server and that port `80` and `443` are open.
|
|
Loading…
Reference in New Issue
Block a user