From 288dde33beb7a565b7e192a68d22f255efe22ba6 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 2 Nov 2018 17:50:27 +0900 Subject: [PATCH 01/22] bump --- docker-compose-generator/docker-fragments/bitcoin-lnd.yml | 2 +- docker-compose-generator/docker-fragments/litecoin-lnd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/docker-fragments/bitcoin-lnd.yml b/docker-compose-generator/docker-fragments/bitcoin-lnd.yml index 8048f15..dc38442 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-lnd.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-lnd.yml @@ -2,7 +2,7 @@ version: "3" services: lnd_bitcoin: - image: btcpayserver/lnd:0.5-beta + image: btcpayserver/lnd:0.5-beta-2 container_name: btcpayserver_lnd_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-lnd.yml b/docker-compose-generator/docker-fragments/litecoin-lnd.yml index ed96f06..ced78bd 100644 --- a/docker-compose-generator/docker-fragments/litecoin-lnd.yml +++ b/docker-compose-generator/docker-fragments/litecoin-lnd.yml @@ -2,7 +2,7 @@ version: "3" services: lnd_litecoin: - image: btcpayserver/lnd:0.5-beta + image: btcpayserver/lnd:0.5-beta-2 container_name: btcpayserver_lnd_litecoin restart: unless-stopped environment: From f43d7c9681078892aa3222d768058db712c75a93 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 2 Nov 2018 19:22:51 +0900 Subject: [PATCH 02/22] bump --- .../docker-fragments/bitcoin-clightning.yml | 2 +- .../docker-fragments/litecoin-clightning.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 2b1fc24..6bbc348 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_bitcoin: - image: nicolasdorier/clightning:v0.6.2 + image: nicolasdorier/clightning:v0.6.2-3-dev container_name: btcpayserver_clightning_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index 6f031ce..cfeed26 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_litecoin: - image: nicolasdorier/clightning:v0.6.2 + image: nicolasdorier/clightning:v0.6.2-3-dev container_name: btcpayserver_clightning_litecoin restart: unless-stopped environment: From 6e55cc42dd4d00ba95adc535a1148dd9c454f955 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 2 Nov 2018 19:34:48 +0900 Subject: [PATCH 03/22] do not use dev time images in prod --- .../docker-fragments/bitcoin-clightning.yml | 2 +- .../docker-fragments/litecoin-clightning.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 6bbc348..5138b20 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_bitcoin: - image: nicolasdorier/clightning:v0.6.2-3-dev + image: nicolasdorier/clightning:v0.6.2-3 container_name: btcpayserver_clightning_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index cfeed26..194f727 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -2,7 +2,7 @@ version: "3" services: clightning_litecoin: - image: nicolasdorier/clightning:v0.6.2-3-dev + image: nicolasdorier/clightning:v0.6.2-3 container_name: btcpayserver_clightning_litecoin restart: unless-stopped environment: From c614e6a6fd4f5ea02159cc5b66b2d4f341854961 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 12:28:08 +0900 Subject: [PATCH 04/22] bump btcpay --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index dea7e56..037eb7c 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: nicolasdorier/btcpayserver:1.0.3.4 + image: nicolasdorier/btcpayserver:1.0.3.6 expose: - "49392" environment: From 141fe6809a9bee2529d4eb9b5aaf17bcd3d1f05b Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 14:09:06 +0900 Subject: [PATCH 05/22] bump --- docker-compose-generator/docker-fragments/nbxplorer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/nbxplorer.yml b/docker-compose-generator/docker-fragments/nbxplorer.yml index 3632bdb..ee17d2d 100644 --- a/docker-compose-generator/docker-fragments/nbxplorer.yml +++ b/docker-compose-generator/docker-fragments/nbxplorer.yml @@ -4,7 +4,7 @@ services: nbxplorer: restart: unless-stopped - image: nicolasdorier/nbxplorer:1.1.0.8 + image: nicolasdorier/nbxplorer:1.1.0.11 expose: - "32838" environment: From 1eed2e6febcc4fd382a911ec6ec740cb746de404 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 17:27:09 +0900 Subject: [PATCH 06/22] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 037eb7c..8f9505e 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: nicolasdorier/btcpayserver:1.0.3.6 + image: nicolasdorier/btcpayserver:1.0.3.7 expose: - "49392" environment: From 487565658a25c9114e68160f6adc13b8ec586194 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 18:24:53 +0900 Subject: [PATCH 07/22] Give timeout to stop docker-compose, SIGKILL clightning --- btcpay-down.sh | 2 +- btcpay-restart.sh | 4 ++-- btcpay-setup.sh | 8 ++++---- btcpay-up.sh | 2 +- btcpay-update.sh | 2 +- changedomain.sh | 2 +- .../docker-fragments/bitcoin-clightning.yml | 1 + .../docker-fragments/litecoin-clightning.yml | 1 + 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/btcpay-down.sh b/btcpay-down.sh index 75dde3e..392631d 100755 --- a/btcpay-down.sh +++ b/btcpay-down.sh @@ -3,4 +3,4 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE down +docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180 diff --git a/btcpay-restart.sh b/btcpay-restart.sh index 76e227c..3d83ac1 100755 --- a/btcpay-restart.sh +++ b/btcpay-restart.sh @@ -3,5 +3,5 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE down -docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d +docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180 +docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d -t 180 diff --git a/btcpay-setup.sh b/btcpay-setup.sh index f5756d4..ca3beb9 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -270,9 +270,9 @@ Requires=docker.service network-online.target Type=oneshot RemainAfterExit=yes -ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d' +ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180' ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" stop' -ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart' +ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart -t 180' [Install] WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service @@ -299,7 +299,7 @@ stop on runlevel [!2345] script . /etc/profile.d/btcpay-env.sh cd \"\$(dirname \$BTCPAY_ENV_FILE)\" - docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d + docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180 end script" > /etc/init/start_containers.conf echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n" initctl reload-configuration @@ -313,7 +313,7 @@ if [ ! -z "$OLD_BTCPAY_DOCKER_COMPOSE" ] && [ "$OLD_BTCPAY_DOCKER_COMPOSE" != "$ docker-compose -f "$OLD_BTCPAY_DOCKER_COMPOSE" down fi -docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans +docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans -t 180 # Give SSH key to BTCPay if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then diff --git a/btcpay-up.sh b/btcpay-up.sh index 4a799ca..d3e6c28 100755 --- a/btcpay-up.sh +++ b/btcpay-up.sh @@ -3,4 +3,4 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d +docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d -t 180 diff --git a/btcpay-update.sh b/btcpay-update.sh index 895766b..361f2fe 100755 --- a/btcpay-update.sh +++ b/btcpay-update.sh @@ -36,4 +36,4 @@ for scriptname in *.sh; do done cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans +docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans -t 180 diff --git a/changedomain.sh b/changedomain.sh index adde316..e871450 100755 --- a/changedomain.sh +++ b/changedomain.sh @@ -20,5 +20,5 @@ echo "BTCPAY_HOST=$BTCPAY_HOST" >> "$BTCPAY_ENV_FILE" echo "ACME_CA_URI=$ACME_CA_URI" >> "$BTCPAY_ENV_FILE" cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d +docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d -t 180 fi diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 5138b20..05a3db6 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -3,6 +3,7 @@ version: "3" services: clightning_bitcoin: image: nicolasdorier/clightning:v0.6.2-3 + stop_signal: SIGKILL container_name: btcpayserver_clightning_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index 194f727..d5e70d8 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -3,6 +3,7 @@ version: "3" services: clightning_litecoin: image: nicolasdorier/clightning:v0.6.2-3 + stop_signal: SIGKILL container_name: btcpayserver_clightning_litecoin restart: unless-stopped environment: From ac4263d71aa57fe7d7504e264cb13dbae517eb36 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 18:28:01 +0900 Subject: [PATCH 08/22] Revert "Give timeout to stop docker-compose, SIGKILL clightning" This reverts commit 487565658a25c9114e68160f6adc13b8ec586194. --- btcpay-down.sh | 2 +- btcpay-restart.sh | 4 ++-- btcpay-setup.sh | 8 ++++---- btcpay-up.sh | 2 +- btcpay-update.sh | 2 +- changedomain.sh | 2 +- .../docker-fragments/bitcoin-clightning.yml | 1 - .../docker-fragments/litecoin-clightning.yml | 1 - 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/btcpay-down.sh b/btcpay-down.sh index 392631d..75dde3e 100755 --- a/btcpay-down.sh +++ b/btcpay-down.sh @@ -3,4 +3,4 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180 +docker-compose -f $BTCPAY_DOCKER_COMPOSE down diff --git a/btcpay-restart.sh b/btcpay-restart.sh index 3d83ac1..76e227c 100755 --- a/btcpay-restart.sh +++ b/btcpay-restart.sh @@ -3,5 +3,5 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180 -docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d -t 180 +docker-compose -f $BTCPAY_DOCKER_COMPOSE down +docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d diff --git a/btcpay-setup.sh b/btcpay-setup.sh index ca3beb9..f5756d4 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -270,9 +270,9 @@ Requires=docker.service network-online.target Type=oneshot RemainAfterExit=yes -ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180' +ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d' ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" stop' -ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart -t 180' +ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart' [Install] WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service @@ -299,7 +299,7 @@ stop on runlevel [!2345] script . /etc/profile.d/btcpay-env.sh cd \"\$(dirname \$BTCPAY_ENV_FILE)\" - docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180 + docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d end script" > /etc/init/start_containers.conf echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n" initctl reload-configuration @@ -313,7 +313,7 @@ if [ ! -z "$OLD_BTCPAY_DOCKER_COMPOSE" ] && [ "$OLD_BTCPAY_DOCKER_COMPOSE" != "$ docker-compose -f "$OLD_BTCPAY_DOCKER_COMPOSE" down fi -docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans -t 180 +docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans # Give SSH key to BTCPay if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then diff --git a/btcpay-up.sh b/btcpay-up.sh index d3e6c28..4a799ca 100755 --- a/btcpay-up.sh +++ b/btcpay-up.sh @@ -3,4 +3,4 @@ . /etc/profile.d/btcpay-env.sh cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d -t 180 +docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d diff --git a/btcpay-update.sh b/btcpay-update.sh index 361f2fe..895766b 100755 --- a/btcpay-update.sh +++ b/btcpay-update.sh @@ -36,4 +36,4 @@ for scriptname in *.sh; do done cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans -t 180 +docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans diff --git a/changedomain.sh b/changedomain.sh index e871450..adde316 100755 --- a/changedomain.sh +++ b/changedomain.sh @@ -20,5 +20,5 @@ echo "BTCPAY_HOST=$BTCPAY_HOST" >> "$BTCPAY_ENV_FILE" echo "ACME_CA_URI=$ACME_CA_URI" >> "$BTCPAY_ENV_FILE" cd "`dirname $BTCPAY_ENV_FILE`" -docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d -t 180 +docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d fi diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 05a3db6..5138b20 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -3,7 +3,6 @@ version: "3" services: clightning_bitcoin: image: nicolasdorier/clightning:v0.6.2-3 - stop_signal: SIGKILL container_name: btcpayserver_clightning_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index d5e70d8..194f727 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -3,7 +3,6 @@ version: "3" services: clightning_litecoin: image: nicolasdorier/clightning:v0.6.2-3 - stop_signal: SIGKILL container_name: btcpayserver_clightning_litecoin restart: unless-stopped environment: From c76ec5930a42e333f1ba9a2a6087ccbb1a5cf8f6 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 18:29:50 +0900 Subject: [PATCH 09/22] SIGKILL clightning --- docker-compose-generator/docker-fragments/bitcoin-clightning.yml | 1 + .../docker-fragments/litecoin-clightning.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml index 5138b20..05a3db6 100644 --- a/docker-compose-generator/docker-fragments/bitcoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/bitcoin-clightning.yml @@ -3,6 +3,7 @@ version: "3" services: clightning_bitcoin: image: nicolasdorier/clightning:v0.6.2-3 + stop_signal: SIGKILL container_name: btcpayserver_clightning_bitcoin restart: unless-stopped environment: diff --git a/docker-compose-generator/docker-fragments/litecoin-clightning.yml b/docker-compose-generator/docker-fragments/litecoin-clightning.yml index 194f727..d5e70d8 100644 --- a/docker-compose-generator/docker-fragments/litecoin-clightning.yml +++ b/docker-compose-generator/docker-fragments/litecoin-clightning.yml @@ -3,6 +3,7 @@ version: "3" services: clightning_litecoin: image: nicolasdorier/clightning:v0.6.2-3 + stop_signal: SIGKILL container_name: btcpayserver_clightning_litecoin restart: unless-stopped environment: From 00abab4a3628f04857d0b5d47e7deda274db6b81 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 18:33:11 +0900 Subject: [PATCH 10/22] Add compose timeout --- btcpay-setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index f5756d4..6973104 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -163,6 +163,7 @@ fi # Put the variables in /etc/profile.d when a user log interactively touch "/etc/profile.d/btcpay-env.sh" echo " +export COMPOSE_HTTP_TIMEOUT=\"180\" export BTCPAYGEN_OLD_PREGEN=\"$BTCPAYGEN_OLD_PREGEN\" export BTCPAYGEN_CRYPTO1=\"$BTCPAYGEN_CRYPTO1\" export BTCPAYGEN_CRYPTO2=\"$BTCPAYGEN_CRYPTO2\" From 65094aa30b7b14fdfae0244f4e1dceb97af88c44 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Mon, 5 Nov 2018 18:41:05 +0900 Subject: [PATCH 11/22] Add COMPOSE_HTTP_TIMEOUT at the next update --- btcpay-update.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/btcpay-update.sh b/btcpay-update.sh index 895766b..9aeb146 100755 --- a/btcpay-update.sh +++ b/btcpay-update.sh @@ -22,6 +22,11 @@ if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE fi +if ! grep -Fxq "export COMPOSE_HTTP_TIMEOUT=\"180\"" "/etc/profile.d/btcpay-env.sh"; then + echo "export COMPOSE_HTTP_TIMEOUT=\"180\"" >> /etc/profile.d/btcpay-env.sh + export COMPOSE_HTTP_TIMEOUT=180 + echo "Adding COMPOSE_HTTP_TIMEOUT=180 in btcpay-env.sh" +fi for scriptname in *.sh; do if [ "$scriptname" == "build.sh" ] || \ From 9d7b96a2402ef47be947530bb5687ed7b366e3c0 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 9 Nov 2018 15:49:16 +0900 Subject: [PATCH 12/22] bump nbx --- docker-compose-generator/docker-fragments/nbxplorer.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/nbxplorer.yml b/docker-compose-generator/docker-fragments/nbxplorer.yml index ee17d2d..3ab7dd8 100644 --- a/docker-compose-generator/docker-fragments/nbxplorer.yml +++ b/docker-compose-generator/docker-fragments/nbxplorer.yml @@ -4,7 +4,7 @@ services: nbxplorer: restart: unless-stopped - image: nicolasdorier/nbxplorer:1.1.0.11 + image: nicolasdorier/nbxplorer:1.1.0.12 expose: - "32838" environment: From 4675e02b72c9a66713b21564f5cc4f4d58119642 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 9 Nov 2018 21:39:44 +0900 Subject: [PATCH 13/22] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 8f9505e..b1eecb5 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: nicolasdorier/btcpayserver:1.0.3.7 + image: nicolasdorier/btcpayserver:1.0.3.8 expose: - "49392" environment: @@ -16,7 +16,7 @@ services: BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS} BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE} - + BTCPAY_DEBUGLOG: btcpay.log links: - nbxplorer - postgres From d02e84edeedfbff9bd74a9d6b632d459a816b14e Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 13 Nov 2018 16:50:55 +0900 Subject: [PATCH 14/22] bump --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index b1eecb5..7723da7 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: nicolasdorier/btcpayserver:1.0.3.8 + image: nicolasdorier/btcpayserver:1.0.3.9 expose: - "49392" environment: From 709be0fc4be69cc747dde7e4edb4499a43b5adc0 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Tue, 13 Nov 2018 13:32:59 +0100 Subject: [PATCH 15/22] btcpay version option --- README.md | 1 + btcpay-setup.sh | 4 ++++ docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 33dd319..55a4dde 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve * `BTCPAY_HOST_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied to BTCPay's data directory * `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host's public key against these fingerprints * `BTCPAYGEN_DOCKER_IMAGE`: Optional, Specify which generator image to use if you have customized the C# generator. Set to `btcpayserver/docker-compose-generator:local` to build the generator locally at runtime. +* `BTCPAY_VERSION`: Optional, Specify which btcpayserver image to use if you have a customized btcpayserver. # Tooling diff --git a/btcpay-setup.sh b/btcpay-setup.sh index 6973104..da09a4a 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -61,6 +61,7 @@ Environment variables: ACME_CA_URI: The API endpoint to ask for HTTPS certificate (default: https://acme-v01.api.letsencrypt.org/directory) BTCPAY_HOST_SSHKEYFILE: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied on BTCPay's data directory BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator) + BTCPAY_VERSION: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver) END } @@ -134,6 +135,7 @@ BTCPAYGEN_CRYPTO9:$BTCPAYGEN_CRYPTO9 BTCPAYGEN_REVERSEPROXY:$BTCPAYGEN_REVERSEPROXY BTCPAYGEN_LIGHTNING:$BTCPAYGEN_LIGHTNING BTCPAYGEN_ADDITIONAL_FRAGMENTS:$BTCPAYGEN_ADDITIONAL_FRAGMENTS +BTCPAY_VERSION:$BTCPAY_VERSION ACME_CA_URI:$ACME_CA_URI ---------------------- Additional exported variables: @@ -183,6 +185,7 @@ export BTCPAY_ENV_FILE=\"$BTCPAY_ENV_FILE\" export BTCPAY_HOST_SSHKEYFILE=\"$BTCPAY_HOST_SSHKEYFILE\" if cat \$BTCPAY_ENV_FILE &> /dev/null; then export BTCPAY_HOST=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')\" +export BTCPAY_VERSION=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_VERSION=\(.*\)$/\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')\" @@ -199,6 +202,7 @@ echo -e "BTCPay Server environment variables successfully saved in /etc/profile. touch $BTCPAY_ENV_FILE echo " BTCPAY_HOST=$BTCPAY_HOST +BTCPAY_VERSION=$BTCPAY_VERSION ACME_CA_URI=$ACME_CA_URI NBITCOIN_NETWORK=$NBITCOIN_NETWORK LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 7723da7..1d02ca0 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: nicolasdorier/btcpayserver:1.0.3.9 + image: ${BTCPAY_VERSION:-nicolasdorier/btcpayserver:nicolasdorier/btcpayserver:1.0.3.9} expose: - "49392" environment: From 817e1144735d84e2403dfaf2e4a8e487051c7729 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Tue, 13 Nov 2018 13:52:11 +0100 Subject: [PATCH 16/22] allow networks to be merged --- docker-compose-generator/src/DockerComposeDefinition.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose-generator/src/DockerComposeDefinition.cs b/docker-compose-generator/src/DockerComposeDefinition.cs index 3e8ad95..01ca5ff 100644 --- a/docker-compose-generator/src/DockerComposeDefinition.cs +++ b/docker-compose-generator/src/DockerComposeDefinition.cs @@ -57,6 +57,7 @@ namespace DockerGenerator } var services = new List>(); var volumes = new List>(); + var networks = new List>(); foreach (var doc in Fragments.Select(f => ParseDocument(f))) { @@ -69,6 +70,10 @@ namespace DockerGenerator { volumes.AddRange(fragmentVolumesRoot.Children); } + if (doc.Children.ContainsKey("networks") && doc.Children["networks"] is YamlMappingNode fragmentNetworksRoot) + { + networks.AddRange(fragmentNetworksRoot.Children); + } } @@ -76,6 +81,7 @@ namespace DockerGenerator output.Add("version", new YamlScalarNode("3") { Style = YamlDotNet.Core.ScalarStyle.DoubleQuoted }); output.Add("services", new YamlMappingNode(Merge(services))); output.Add("volumes", new YamlMappingNode(volumes)); + output.Add("networks", new YamlMappingNode(networks)); var result = serializer.Serialize(output); var outputFile = GetFilePath(); File.WriteAllText(outputFile, result.Replace("''", "")); From 94c62d7d190fedec71733336dfe8e7b6ec245749 Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Tue, 13 Nov 2018 14:04:06 +0100 Subject: [PATCH 17/22] rename to image --- README.md | 2 +- btcpay-setup.sh | 8 ++++---- .../docker-fragments/btcpayserver.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 55a4dde..881f1df 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-serve * `BTCPAY_HOST_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied to BTCPay's data directory * `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host's public key against these fingerprints * `BTCPAYGEN_DOCKER_IMAGE`: Optional, Specify which generator image to use if you have customized the C# generator. Set to `btcpayserver/docker-compose-generator:local` to build the generator locally at runtime. -* `BTCPAY_VERSION`: Optional, Specify which btcpayserver image to use if you have a customized btcpayserver. +* `BTCPAY_IMAGE`: Optional, Specify which btcpayserver image to use if you have a customized btcpayserver. # Tooling diff --git a/btcpay-setup.sh b/btcpay-setup.sh index da09a4a..6a9c995 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -61,7 +61,7 @@ Environment variables: ACME_CA_URI: The API endpoint to ask for HTTPS certificate (default: https://acme-v01.api.letsencrypt.org/directory) BTCPAY_HOST_SSHKEYFILE: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied on BTCPay's data directory BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator) - BTCPAY_VERSION: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver) + BTCPAY_IMAGE: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver) END } @@ -135,7 +135,7 @@ BTCPAYGEN_CRYPTO9:$BTCPAYGEN_CRYPTO9 BTCPAYGEN_REVERSEPROXY:$BTCPAYGEN_REVERSEPROXY BTCPAYGEN_LIGHTNING:$BTCPAYGEN_LIGHTNING BTCPAYGEN_ADDITIONAL_FRAGMENTS:$BTCPAYGEN_ADDITIONAL_FRAGMENTS -BTCPAY_VERSION:$BTCPAY_VERSION +BTCPAY_IMAGE:$BTCPAY_IMAGE ACME_CA_URI:$ACME_CA_URI ---------------------- Additional exported variables: @@ -185,7 +185,7 @@ export BTCPAY_ENV_FILE=\"$BTCPAY_ENV_FILE\" export BTCPAY_HOST_SSHKEYFILE=\"$BTCPAY_HOST_SSHKEYFILE\" if cat \$BTCPAY_ENV_FILE &> /dev/null; then export BTCPAY_HOST=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')\" -export BTCPAY_VERSION=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_VERSION=\(.*\)$/\1/p')\" +export BTCPAY_IMAGE=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_IMAGE=\(.*\)$/\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')\" @@ -202,7 +202,7 @@ echo -e "BTCPay Server environment variables successfully saved in /etc/profile. touch $BTCPAY_ENV_FILE echo " BTCPAY_HOST=$BTCPAY_HOST -BTCPAY_VERSION=$BTCPAY_VERSION +BTCPAY_IMAGE=$BTCPAY_IMAGE ACME_CA_URI=$ACME_CA_URI NBITCOIN_NETWORK=$NBITCOIN_NETWORK LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 1d02ca0..7bcd7ad 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_VERSION:-nicolasdorier/btcpayserver:nicolasdorier/btcpayserver:1.0.3.9} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:nicolasdorier/btcpayserver:1.0.3.9} expose: - "49392" environment: From 7ab399ace5312f3bc3ccec346899efe39b972c4f Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 13 Nov 2018 23:20:15 +0900 Subject: [PATCH 18/22] fix --- docker-compose-generator/docker-fragments/btcpayserver.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-generator/docker-fragments/btcpayserver.yml b/docker-compose-generator/docker-fragments/btcpayserver.yml index 7bcd7ad..fb7d73f 100644 --- a/docker-compose-generator/docker-fragments/btcpayserver.yml +++ b/docker-compose-generator/docker-fragments/btcpayserver.yml @@ -4,7 +4,7 @@ services: btcpayserver: restart: unless-stopped - image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:nicolasdorier/btcpayserver:1.0.3.9} + image: ${BTCPAY_IMAGE:-nicolasdorier/btcpayserver:1.0.3.9} expose: - "49392" environment: From a350f4fe3667ce755414a3784a5329b38fffe7d8 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 16 Nov 2018 18:02:28 +0900 Subject: [PATCH 19/22] fix doc for no reverse proxy --- Production-NoReverseProxy/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Production-NoReverseProxy/README.md b/Production-NoReverseProxy/README.md index 0593d45..a57bf2d 100644 --- a/Production-NoReverseProxy/README.md +++ b/Production-NoReverseProxy/README.md @@ -33,6 +33,7 @@ With Powershell: $env:BTCPAY_ROOTPATH="/test"; $env:BTCPAY_PROTOCOL="http"; $env:BTCPAY_HOST="btcpay.example.com"; +$env:BTCPAYGEN_REVERSEPROXY="none"; .\build.ps1 docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d ``` @@ -43,6 +44,7 @@ With Linux: export BTCPAY_ROOTPATH="/test" export BTCPAY_PROTOCOL="http" export BTCPAY_HOST="btcpay.example.com" +export BTCPAYGEN_REVERSEPROXY="none" ./build.sh docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d ``` From 6ef0cf95a848d31354acc3ddace1ed0ca1334dd2 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 16 Nov 2018 22:37:21 +0900 Subject: [PATCH 20/22] Validate BTCPAY_HOST --- btcpay-setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index 6a9c995..14cc2a2 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -115,6 +115,15 @@ if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then done fi +if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]]; then + DOMAIN_NAME="$(echo "$BTCPAY_HOST" | grep -P '(?=^.{4,253}$)(^(?:[a-zA-Z0-9](?:(?:[a-zA-Z0-9\-]){0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$)')" + if [[ ! "$DOMAIN_NAME" ]]; then + echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must point on a domain name, but the current value ('$BTCPAY_HOST') is not a valid domain name." + return + fi + BTCPAY_HOST="$DOMAIN_NAME" +fi + echo " -------SETUP----------- Parameters passed: From 0e532c4123e99f47f01ba1de088745c0dbb676e4 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 16 Nov 2018 22:40:00 +0900 Subject: [PATCH 21/22] better error message --- btcpay-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btcpay-setup.sh b/btcpay-setup.sh index 14cc2a2..d62a88d 100755 --- a/btcpay-setup.sh +++ b/btcpay-setup.sh @@ -118,7 +118,7 @@ fi if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]]; then DOMAIN_NAME="$(echo "$BTCPAY_HOST" | grep -P '(?=^.{4,253}$)(^(?:[a-zA-Z0-9](?:(?:[a-zA-Z0-9\-]){0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$)')" if [[ ! "$DOMAIN_NAME" ]]; then - echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must point on a domain name, but the current value ('$BTCPAY_HOST') is not a valid domain name." + echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must be a domain name which point to this server (with port 80 and 443 open), but the current value of BTCPAY_HOST ('$BTCPAY_HOST') is not a valid domain name." return fi BTCPAY_HOST="$DOMAIN_NAME" From 764e64876cecdcd5e64e42db4f13efb8e0d6f8da Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 17 Nov 2018 00:09:51 +0900 Subject: [PATCH 22/22] bump docker-compose generator --- docker-compose-generator/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-generator/Dockerfile b/docker-compose-generator/Dockerfile index 49e8be0..0614d7f 100644 --- a/docker-compose-generator/Dockerfile +++ b/docker-compose-generator/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.1.403-sdk-alpine3.7 AS builder +FROM microsoft/dotnet:2.1.500-sdk-alpine3.7 AS builder WORKDIR /source COPY src/docker-compose-generator.csproj docker-compose-generator.csproj # Cache some dependencies @@ -6,7 +6,7 @@ RUN dotnet restore COPY src/. . RUN dotnet publish --output /app/ --configuration Release -FROM microsoft/dotnet:2.1.5-runtime-alpine3.7 +FROM microsoft/dotnet:2.1.6-runtime-alpine3.7 WORKDIR /app RUN mkdir /datadir