Imrove deployment reliability.

This commit is contained in:
Derek Smith 2023-04-04 16:23:42 -04:00
parent 305c1afcbd
commit 55de36dadc
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 10 additions and 2 deletions

View File

@ -5,7 +5,12 @@ cd "$(dirname "$0")"
export DOCKER_HOST="ssh://ubuntu@$BTCPAY_FQDN"
./stub_btcpay_setup.sh
if [ "$STOP_SERVICES" = true ]; then
# run the update.
ssh "$FQDN" "bash -c $BTCPAY_SERVER_APPPATH/btcpay-down.sh"
else
./stub_btcpay_setup.sh
fi
# we will re-run the btcpayserver provisioning scripts if directed to do so.
# if an update does occur, we grab another backup.
@ -16,7 +21,7 @@ if [ "$UPDATE_BTCPAY" = true ]; then
# btcpay-update.sh brings services back up, but does not take them down.
ssh "$FQDN" "sudo bash -c $BTCPAY_SERVER_APPPATH/btcpay-update.sh"
sleep 20
sleep 30
elif [ "$RESTORE_BTCPAY" = true ]; then
# run the update.

View File

@ -138,6 +138,9 @@ EOL
done
if [ "$STOP_SERVICES" = false ]; then
# for some reason we need to wait here. See if there's a fix; poll for service readiness?
sleep 3
docker stack deploy -c "$DOCKER_YAML_PATH" reverse-proxy
# iterate over all our domains and create the nginx config file.
sleep 3