diff --git a/Production-NoReverseProxy/docker-compose.btc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-clightning.yml index 559d5e0..6e4b5de 100644 --- a/Production-NoReverseProxy/docker-compose.btc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-clightning.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml index 2582775..739d078 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc-clightning.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production-NoReverseProxy/docker-compose.btc-ltc.yml b/Production-NoReverseProxy/docker-compose.btc-ltc.yml index cfc7bcc..76204f7 100644 --- a/Production-NoReverseProxy/docker-compose.btc-ltc.yml +++ b/Production-NoReverseProxy/docker-compose.btc-ltc.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production-NoReverseProxy/docker-compose.btc.yml b/Production-NoReverseProxy/docker-compose.btc.yml index acfbb3c..0094492 100644 --- a/Production-NoReverseProxy/docker-compose.btc.yml +++ b/Production-NoReverseProxy/docker-compose.btc.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml index a66408f..ccd0875 100644 --- a/Production-NoReverseProxy/docker-compose.ltc-clightning.yml +++ b/Production-NoReverseProxy/docker-compose.ltc-clightning.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production-NoReverseProxy/docker-compose.ltc.yml b/Production-NoReverseProxy/docker-compose.ltc.yml index 71492c9..b8b3f77 100644 --- a/Production-NoReverseProxy/docker-compose.ltc.yml +++ b/Production-NoReverseProxy/docker-compose.ltc.yml @@ -10,6 +10,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/README.md b/Production/README.md index 0f32b03..ce32189 100644 --- a/Production/README.md +++ b/Production/README.md @@ -17,12 +17,15 @@ It is composed of: 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) +* `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. * `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) * `LIGHTNING_ALIAS`: Optional, if using the integrated lightning feature, customize the alias of your nodes +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. diff --git a/Production/docker-compose.btc-clightning.yml b/Production/docker-compose.btc-clightning.yml index 7127a50..45a3b04 100644 --- a/Production/docker-compose.btc-clightning.yml +++ b/Production/docker-compose.btc-clightning.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/docker-compose.btc-ltc-clightning.yml b/Production/docker-compose.btc-ltc-clightning.yml index 587160d..c316224 100644 --- a/Production/docker-compose.btc-ltc-clightning.yml +++ b/Production/docker-compose.btc-ltc-clightning.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/docker-compose.btc-ltc.yml b/Production/docker-compose.btc-ltc.yml index 7ac16c4..17f706f 100644 --- a/Production/docker-compose.btc-ltc.yml +++ b/Production/docker-compose.btc-ltc.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/docker-compose.btc.yml b/Production/docker-compose.btc.yml index 47a67d5..1041697 100644 --- a/Production/docker-compose.btc.yml +++ b/Production/docker-compose.btc.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/docker-compose.ltc-clightning.yml b/Production/docker-compose.ltc-clightning.yml index 69dab36..bbba070 100644 --- a/Production/docker-compose.ltc-clightning.yml +++ b/Production/docker-compose.ltc-clightning.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/Production/docker-compose.ltc.yml b/Production/docker-compose.ltc.yml index 032ce9a..d9759e1 100644 --- a/Production/docker-compose.ltc.yml +++ b/Production/docker-compose.ltc.yml @@ -54,6 +54,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} VIRTUAL_NETWORK: nginx-proxy VIRTUAL_PORT: 49392 VIRTUAL_HOST: ${BTCPAY_HOST} diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 9ca2a4c..b57208f 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -13,6 +13,7 @@ services: BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} BTCPAY_BIND: 0.0.0.0:49392 BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ + BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} # NGINX settings VIRTUAL_NETWORK: nginx-proxy