Browse Source

Merge remote-tracking branch 'btcpayserver/master' into grs-clightning

feature/auto_ssh
Andrew Camilleri 6 years ago
parent
commit
c84cf72ada
  1. 13
      Production/nginx.tmpl
  2. 8
      README.md
  3. 14
      btcpay-setup.sh
  4. 15
      contrib/DockerFileBuildHelper/Program.cs
  5. 70
      contrib/build-all-images.sh
  6. 2
      docker-compose-generator/docker-fragments/bitcoin-lnd.yml
  7. 2
      docker-compose-generator/docker-fragments/btcpayserver.yml
  8. 2
      docker-compose-generator/docker-fragments/litecoin-lnd.yml
  9. 32
      docker-compose-generator/docker-fragments/opt-add-btcqbo.yml

13
Production/nginx.tmpl

@ -310,6 +310,19 @@ server {
} }
{{ end }} {{ end }}
{{ 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 }}
} }
{{ end }} {{ end }}

8
README.md

@ -227,13 +227,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_ENV_FILE="/var/lib/waagent/custom-script/download/0/.env"
export BTCPAY_HOST_SSHKEYFILE="/root/.ssh/id_rsa_btcpay" export BTCPAY_HOST_SSHKEYFILE="/root/.ssh/id_rsa_btcpay"
if cat $BTCPAY_ENV_FILE &> /dev/null; then if cat $BTCPAY_ENV_FILE &> /dev/null; then
export BTCPAY_HOST="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')" export $(grep -v '^#' "$BTCPAY_ENV_FILE" | xargs)
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')"
fi fi
``` ```

14
btcpay-setup.sh

@ -70,6 +70,15 @@ if [ "$1" != "-i" ]; then
return return
fi 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 ############ ######### Migration: old pregen environment to new environment ############
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then 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" 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"
@ -157,11 +166,6 @@ BTCPAY_SSHTRUSTEDFINGERPRINTS:$BTCPAY_SSHTRUSTEDFINGERPRINTS
---------------------- ----------------------
" "
if [ -z "$BTCPAY_HOST" ]; then
echo "BTCPAY_HOST should not be empty"
return
fi
if [ -z "$BTCPAYGEN_CRYPTO1" ]; then if [ -z "$BTCPAYGEN_CRYPTO1" ]; then
echo "BTCPAYGEN_CRYPTO1 should not be empty" echo "BTCPAYGEN_CRYPTO1 should not be empty"
return return

15
contrib/DockerFileBuildHelper/Program.cs

@ -181,9 +181,10 @@ namespace DockerFileBuildHelper
dockerInfo.GitRef = $"basedon-{image.Tag}"; dockerInfo.GitRef = $"basedon-{image.Tag}";
break; break;
case "lnd": case "lnd":
dockerInfo.DockerFilePath = "BTCPayServer.Dockerfile"; dockerInfo.DockerFilePath = "linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "linuxarm32v7.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/lnd"; dockerInfo.GitLink = "https://github.com/btcpayserver/lnd";
dockerInfo.GitRef = $"basedon-v{image.Tag}"; dockerInfo.GitRef = $"basedon-{image.Tag}";
break; break;
case "bitcoin": case "bitcoin":
dockerInfo.DockerFilePath = $"Bitcoin/{image.Tag}/linuxamd64.Dockerfile"; dockerInfo.DockerFilePath = $"Bitcoin/{image.Tag}/linuxamd64.Dockerfile";
@ -263,6 +264,16 @@ namespace DockerFileBuildHelper
dockerInfo.GitLink = "https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion"; dockerInfo.GitLink = "https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion";
dockerInfo.GitRef = $"v{image.Tag}"; dockerInfo.GitRef = $"v{image.Tag}";
break; 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": case "postgres":
dockerInfo.DockerFilePath = $"9.6/Dockerfile"; dockerInfo.DockerFilePath = $"9.6/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"9.6/Dockerfile"; dockerInfo.DockerFilePathARM32v7 = $"9.6/Dockerfile";

70
contrib/build-all-images.sh

@ -71,14 +71,16 @@ cd - && cd ..
# Build lnd # Build lnd
# https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-2/BTCPayServer.Dockerfile # https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-3/linuxamd64.Dockerfile
DOCKERFILE="BTCPayServer.Dockerfile" DOCKERFILE="linuxamd64.Dockerfile"
echo "Building btcpayserver/lnd:0.5-beta-2" # https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-3/linuxarm32v7.Dockerfile
[[ "$(uname -m)" == "armv7l" ]] && DOCKERFILE="linuxarm32v7.Dockerfile"
echo "Building btcpayserver/lnd:v0.5-beta-3"
git clone https://github.com/btcpayserver/lnd lnd git clone https://github.com/btcpayserver/lnd lnd
cd lnd cd lnd
git checkout basedon-v0.5-beta-2 git checkout basedon-v0.5-beta-3
cd "$(dirname $DOCKERFILE)" cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "btcpayserver/lnd:0.5-beta-2" . docker build -f "$DOCKERFILE" -t "btcpayserver/lnd:v0.5-beta-3" .
cd - && cd .. cd - && cd ..
@ -111,16 +113,16 @@ cd - && cd ..
# Build btcpayserver # 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" 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" [[ "$(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 git clone https://github.com/btcpayserver/btcpayserver btcpayserver
cd btcpayserver cd btcpayserver
git checkout v1.0.3.23 git checkout v1.0.3.24
cd "$(dirname $DOCKERFILE)" 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 .. cd - && cd ..
@ -189,14 +191,16 @@ cd - && cd ..
# Build lnd # Build lnd
# https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-2/BTCPayServer.Dockerfile # https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-3/linuxamd64.Dockerfile
DOCKERFILE="BTCPayServer.Dockerfile" DOCKERFILE="linuxamd64.Dockerfile"
echo "Building btcpayserver/lnd:0.5-beta-2" # https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.5-beta-3/linuxarm32v7.Dockerfile
[[ "$(uname -m)" == "armv7l" ]] && DOCKERFILE="linuxarm32v7.Dockerfile"
echo "Building btcpayserver/lnd:v0.5-beta-3"
git clone https://github.com/btcpayserver/lnd lnd git clone https://github.com/btcpayserver/lnd lnd
cd lnd cd lnd
git checkout basedon-v0.5-beta-2 git checkout basedon-v0.5-beta-3
cd "$(dirname $DOCKERFILE)" cd "$(dirname $DOCKERFILE)"
docker build -f "$DOCKERFILE" -t "btcpayserver/lnd:0.5-beta-2" . docker build -f "$DOCKERFILE" -t "btcpayserver/lnd:v0.5-beta-3" .
cd - && cd .. cd - && cd ..
@ -278,6 +282,42 @@ docker build -f "$DOCKERFILE" -t "btcpayserver/letsencrypt-nginx-proxy-companion
cd - && cd .. 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 # Build postgres
# https://raw.githubusercontent.com/docker-library/postgres/b7cb3c6eacea93be2259381033be3cc435649369/9.6/Dockerfile # https://raw.githubusercontent.com/docker-library/postgres/b7cb3c6eacea93be2259381033be3cc435649369/9.6/Dockerfile
DOCKERFILE="9.6/Dockerfile" DOCKERFILE="9.6/Dockerfile"

2
docker-compose-generator/docker-fragments/bitcoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services: services:
lnd_bitcoin: lnd_bitcoin:
image: btcpayserver/lnd:0.5-beta-2 image: btcpayserver/lnd:v0.5-beta-3
container_name: btcpayserver_lnd_bitcoin container_name: btcpayserver_lnd_bitcoin
restart: unless-stopped restart: unless-stopped
environment: environment:

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

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

2
docker-compose-generator/docker-fragments/litecoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services: services:
lnd_litecoin: lnd_litecoin:
image: btcpayserver/lnd:0.5-beta-2 image: btcpayserver/lnd:v0.5-beta-3
container_name: btcpayserver_lnd_litecoin container_name: btcpayserver_lnd_litecoin
restart: unless-stopped restart: unless-stopped
environment: 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