diff --git a/deploy.sh b/deploy.sh index 9d42a40..6faa332 100755 --- a/deploy.sh +++ b/deploy.sh @@ -35,6 +35,7 @@ if lxc remote get-default | grep -q "production"; then fi +PRIMARY_DOMAIN= RUN_CERT_RENEWAL=true SKIP_WWW=false RESTORE_WWW=false @@ -290,7 +291,7 @@ export DOMAIN_COUNT=$(("$(echo "$DOMAIN_LIST" | tr -cd , | wc -c)"+1)) # let's provision our primary domain first. export DOMAIN_NAME="$PRIMARY_DOMAIN" - +export PRIMARY_DOMAIN="$PRIMARY_DOMAIN" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME" diff --git a/www/stop_docker_stacks.sh b/www/stop_docker_stacks.sh index 9ffa3a6..2fc62e2 100755 --- a/www/stop_docker_stacks.sh +++ b/www/stop_docker_stacks.sh @@ -53,5 +53,5 @@ done if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then docker stack rm reverse-proxy - sleep 5 + sleep 10 fi diff --git a/www/stub/nginx_config.sh b/www/stub/nginx_config.sh index 75f8998..bd01eb8 100755 --- a/www/stub/nginx_config.sh +++ b/www/stub/nginx_config.sh @@ -269,8 +269,8 @@ EOL # Route everything to the real BTCPay server location / { - # URL of BTCPay Server - proxy_pass http://$LXD_VM_NAME.lxd:80; + # URL of BTCPay Server on the ss-ovn logical network + proxy_pass http://${BTCPAY_HOSTNAME}-${PRIMARY_DOMAIN//./-}.lxd:80; proxy_set_header Host \$http_host; proxy_set_header X-Forwarded-Proto \$scheme; proxy_set_header X-Real-IP \$remote_addr;