Browse Source

Merge remote-tracking branch 'btcpayserver/master' into feature/mysql

feature/auto_ssh
Andrew Camilleri 6 years ago
parent
commit
4d5dad7f93
  1. 27
      Production/nginx.tmpl
  2. 8
      README.md
  3. 14
      btcpay-setup.sh
  4. 10
      contrib/DockerFileBuildHelper/Program.cs
  5. 46
      contrib/build-all-images.sh
  6. 2
      docker-compose-generator/docker-fragments/btcpayserver.yml
  7. 32
      docker-compose-generator/docker-fragments/opt-add-btcqbo.yml

27
Production/nginx.tmpl

@ -301,13 +301,26 @@ server {
{{ range $container := $ }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "lnd_bitcoin") }}
location /lnrpc.Lightning {
grpc_pass grpcs://lnd_bitcoin:10009;
}
location /lnd-rest/btc/ {
rewrite ^/lnd-rest/btc/(.*) /$1 break;
proxy_pass http://lnd_bitcoin:8080/;
}
location /lnrpc.Lightning {
grpc_pass grpcs://lnd_bitcoin:10009;
}
location /lnd-rest/btc/ {
rewrite ^/lnd-rest/btc/(.*) /$1 break;
proxy_pass http://lnd_bitcoin:8080/;
}
{{ end }}
{{ end }}
{{ range $container := $ }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "btcqbo") }}
location /btcqbo/ {
proxy_pass http://btcqbo:8001;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
{{ end }}
{{ end }}
}

8
README.md

@ -228,13 +228,7 @@ export BTCPAY_BASE_DIRECTORY="/var/lib/waagent/custom-script/download/0"
export BTCPAY_ENV_FILE="/var/lib/waagent/custom-script/download/0/.env"
export BTCPAY_HOST_SSHKEYFILE="/root/.ssh/id_rsa_btcpay"
if cat $BTCPAY_ENV_FILE &> /dev/null; then
export BTCPAY_HOST="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')"
export LETSENCRYPT_EMAIL="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')"
export NBITCOIN_NETWORK="$(cat $BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')"
export LIGHTNING_ALIAS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')"
export ACME_CA_URI="$(cat $BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')"
export BTCPAY_SSHKEYFILE="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHKEYFILE=\(.*\)$/\1/p')"
export BTCPAY_SSHTRUSTEDFINGERPRINTS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHTRUSTEDFINGERPRINTS=\(.*\)$/\1/p')"
export $(grep -v '^#' "$BTCPAY_ENV_FILE" | xargs)
fi
```

14
btcpay-setup.sh

@ -71,6 +71,15 @@ if [ "$1" != "-i" ]; then
return
fi
if [ -z "$BTCPAY_HOST" ]; then
if [ -f "/etc/profile.d/btcpay-env.sh" ]; then
echo "This script must be run as root after running \"sudo su -\""
else
echo "BTCPAY_HOST should not be empty"
fi
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"
@ -160,11 +169,6 @@ BTCPAY_SSHTRUSTEDFINGERPRINTS:$BTCPAY_SSHTRUSTEDFINGERPRINTS
----------------------
"
if [ -z "$BTCPAY_HOST" ]; then
echo "BTCPAY_HOST should not be empty"
return
fi
if [ -z "$BTCPAYGEN_CRYPTO1" ]; then
echo "BTCPAYGEN_CRYPTO1 should not be empty"
return

10
contrib/DockerFileBuildHelper/Program.cs

@ -264,6 +264,16 @@ namespace DockerFileBuildHelper
dockerInfo.GitLink = "https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion";
dockerInfo.GitRef = $"v{image.Tag}";
break;
case "btcqbo":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/JeffVandrewJr/btcqbo";
dockerInfo.GitRef = $"v{image.Tag}";
break;
case "redis":
dockerInfo.DockerFilePath = $"5.0/Dockerfile";
dockerInfo.GitLink = "https://github.com/docker-library/redis";
dockerInfo.GitRef = $"f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c";
break;
case "postgres":
dockerInfo.DockerFilePath = $"9.6/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"9.6/Dockerfile";

46
contrib/build-all-images.sh

@ -113,16 +113,16 @@ cd - && cd ..
# Build btcpayserver
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.23/Dockerfile.linuxamd64
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.24/Dockerfile.linuxamd64
DOCKERFILE="Dockerfile.linuxamd64"
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.23/Dockerfile.linuxarm32v7
# https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.0.3.24/Dockerfile.linuxarm32v7
[[ "$(uname -m)" == "armv7l" ]] && DOCKERFILE="Dockerfile.linuxarm32v7"
echo "Building btcpayserver/btcpayserver:1.0.3.23"
echo "Building btcpayserver/btcpayserver:1.0.3.24"
git clone https://github.com/btcpayserver/btcpayserver btcpayserver
cd btcpayserver
git checkout v1.0.3.23
git checkout v1.0.3.24
cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "btcpayserver/btcpayserver:1.0.3.23" .
docker build -f "$DOCKERFILE" -t "btcpayserver/btcpayserver:1.0.3.24" .
cd - && cd ..
@ -282,6 +282,42 @@ docker build -f "$DOCKERFILE" -t "btcpayserver/letsencrypt-nginx-proxy-companion
cd - && cd ..
# Build btcqbo
# https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.1.1/Dockerfile
DOCKERFILE="Dockerfile"
echo "Building jvandrew/btcqbo:0.1.1"
git clone https://github.com/JeffVandrewJr/btcqbo btcqbo
cd btcqbo
git checkout v0.1.1
cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "jvandrew/btcqbo:0.1.1" .
cd - && cd ..
# Build btcqbo
# https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.1.1/Dockerfile
DOCKERFILE="Dockerfile"
echo "Building jvandrew/btcqbo:0.1.1"
git clone https://github.com/JeffVandrewJr/btcqbo btcqbo
cd btcqbo
git checkout v0.1.1
cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "jvandrew/btcqbo:0.1.1" .
cd - && cd ..
# Build redis
# https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile
DOCKERFILE="5.0/Dockerfile"
echo "Building redis:5.0.2-alpine"
git clone https://github.com/docker-library/redis redis
cd redis
git checkout f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c
cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "redis:5.0.2-alpine" .
cd - && cd ..
# Build postgres
# https://raw.githubusercontent.com/docker-library/postgres/b7cb3c6eacea93be2259381033be3cc435649369/9.6/Dockerfile
DOCKERFILE="9.6/Dockerfile"

2
docker-compose-generator/docker-fragments/btcpayserver.yml

@ -4,7 +4,7 @@ services:
btcpayserver:
restart: unless-stopped
image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.23}
image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.25}
expose:
- "49392"
environment:

32
docker-compose-generator/docker-fragments/opt-add-btcqbo.yml

@ -0,0 +1,32 @@
version: "3"
services:
btcqbo:
image: jvandrew/btcqbo:0.1.1
environment:
REDIS_URL: "redis://redis:6379/0"
BTCPAY_HOST: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}
CALLBACK_URL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/btcqbo/qbologged
expose:
- "8001"
links:
- redis
rq-worker:
image: jvandrew/btcqbo:0.1.1
entrypoint: /usr/local/bin/rq
command: worker -u redis://redis:6379/0 btcqbo
environment:
REDIS_URL: "redis://redis:6379/0"
expose:
- "8001"
links:
- redis
redis:
image: redis:5.0.2-alpine
expose:
- "6379"
volumes:
- "redis_datadir:/data"
volumes:
redis_datadir:
Loading…
Cancel
Save