mirror of
https://github.com/aljazceru/btcpayserver-docker.git
synced 2026-01-31 22:34:21 +01:00
allow specification of additional domains with https support (#164)
This commit is contained in:
committed by
Nicolas Dorier
parent
53ff474671
commit
3b44087ff3
@@ -117,6 +117,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve
|
||||
`btcpay-setup.sh` will use the following environment variables:
|
||||
|
||||
* `BTCPAY_HOST`: The hostname of your website (eg. `btcpay.example.com`)
|
||||
* `BTCPAY_ADDITIONAL_HOSTS`: Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)
|
||||
* `REVERSEPROXY_HTTP_PORT`: The public port the reverse proxy binds to for HTTP traffic (default: 80)
|
||||
* `REVERSEPROXY_HTTPS_PORT`: The public port the reverse proxy binds to for HTTPS traffic (default: 443)
|
||||
* `REVERSEPROXY_DEFAULT_HOST`: Optional, if using a reverse proxy nginx, specify which website should be presented if the server is accessed by its IP.
|
||||
|
||||
@@ -97,6 +97,7 @@ Environment variables:
|
||||
BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator)
|
||||
BTCPAY_IMAGE: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver)
|
||||
BTCPAY_PROTOCOL: Allows you to specify the external transport protocol of BTCPayServer. (Default: https)
|
||||
BTCPAY_ADDITIONAL_HOSTS: Allows you to specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)
|
||||
Add-on specific variables:
|
||||
LIBREPATRON_HOST: If libre patron is activated with opt-add-librepatron, the hostname of your libre patron website (eg. librepatron.example.com)
|
||||
WOOCOMMERCE_HOST: If woocommerce is activated with opt-add-woocommerce, the hostname of your woocommerce website (eg. store.example.com)
|
||||
@@ -142,7 +143,7 @@ while (( "$#" )); do
|
||||
esac
|
||||
done
|
||||
|
||||
# If start does not have a value, stophere
|
||||
# If start does not have a value, stop here
|
||||
if ! [[ "$START" ]]; then
|
||||
display_help
|
||||
return
|
||||
@@ -160,6 +161,10 @@ if [[ -z "$BTCPAYGEN_CRYPTO1" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -z "$BTCPAY_ADDITIONAL_HOSTS" ] && [[ "$BTCPAY_ADDITIONAL_HOSTS" == *[';']* ]]; then
|
||||
echo "$BTCPAY_ADDITIONAL_HOSTS should be separated by a , not ;"
|
||||
return;
|
||||
fi
|
||||
######### Migration: old pregen environment to new environment ############
|
||||
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"
|
||||
@@ -178,6 +183,7 @@ fi
|
||||
: "${REVERSEPROXY_DEFAULT_HOST:=none}"
|
||||
: "${ACME_CA_URI:=https://acme-v01.api.letsencrypt.org/directory}"
|
||||
: "${BTCPAY_PROTOCOL:=https}"
|
||||
: "${BTCPAY_ADDITIONAL_HOSTS:=}"
|
||||
: "${REVERSEPROXY_HTTP_PORT:=80}"
|
||||
: "${REVERSEPROXY_HTTPS_PORT:=443}"
|
||||
|
||||
@@ -229,6 +235,7 @@ echo "
|
||||
Parameters passed:
|
||||
BTCPAY_PROTOCOL:$BTCPAY_PROTOCOL
|
||||
BTCPAY_HOST:$BTCPAY_HOST
|
||||
BTCPAY_ADDITIONAL_HOSTS:$BTCPAY_ADDITIONAL_HOSTS
|
||||
REVERSEPROXY_HTTP_PORT:$REVERSEPROXY_HTTP_PORT
|
||||
REVERSEPROXY_HTTPS_PORT:$REVERSEPROXY_HTTPS_PORT
|
||||
REVERSEPROXY_DEFAULT_HOST:$REVERSEPROXY_DEFAULT_HOST
|
||||
|
||||
@@ -7,10 +7,10 @@ services:
|
||||
# NGINX settings
|
||||
VIRTUAL_NETWORK: nginx-proxy
|
||||
VIRTUAL_PORT: 49392
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST}
|
||||
VIRTUAL_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS}
|
||||
VIRTUAL_HOST_NAME: "btcpay"
|
||||
SSL_POLICY: Mozilla-Modern
|
||||
|
||||
# Let's encrypt settings
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST}
|
||||
LETSENCRYPT_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
@@ -15,7 +15,7 @@ services:
|
||||
- "nginx_certs:/etc/nginx/certs:ro"
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/docker-gen:0.7.5
|
||||
image: btcpayserver/docker-gen:0.7.6
|
||||
container_name: nginx-gen
|
||||
environment:
|
||||
DEFAULT_HOST: ${REVERSEPROXY_DEFAULT_HOST:-none}
|
||||
|
||||
@@ -70,6 +70,7 @@ touch $BTCPAY_ENV_FILE
|
||||
echo "
|
||||
BTCPAY_PROTOCOL=$BTCPAY_PROTOCOL
|
||||
BTCPAY_HOST=$BTCPAY_HOST
|
||||
BTCPAY_ADDITIONAL_HOSTS=$BTCPAY_ADDITIONAL_HOSTS
|
||||
BTCPAY_ANNOUNCEABLE_HOST=$BTCPAY_ANNOUNCEABLE_HOST
|
||||
REVERSEPROXY_HTTP_PORT=$REVERSEPROXY_HTTP_PORT
|
||||
REVERSEPROXY_HTTPS_PORT=$REVERSEPROXY_HTTPS_PORT
|
||||
|
||||
Reference in New Issue
Block a user