From 8ec3af6703516d0eb11a52afde62a9bb86ad618f Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Fri, 7 Apr 2023 10:57:54 -0400 Subject: [PATCH] Add skip-base-image flag. --- deployment/deploy.sh | 11 +++++++++-- deployment/update.sh | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/deployment/deploy.sh b/deployment/deploy.sh index 92b446f..139b441 100755 --- a/deployment/deploy.sh +++ b/deployment/deploy.sh @@ -35,8 +35,10 @@ if lxc remote get-default | grep -q "production"; then fi + PRIMARY_DOMAIN= RUN_CERT_RENEWAL=true +SKIP_BASE_IMAGE_CREATION=false SKIP_WWW=false RESTORE_WWW=false RESTORE_CERTS=false @@ -101,6 +103,10 @@ for i in "$@"; do SKIP_BTCPAY=true shift ;; + --skip-base-image) + SKIP_BASE_IMAGE_CREATION=true + shift + ;; --no-cert-renew) RUN_CERT_RENEWAL=false shift @@ -303,7 +309,9 @@ VPS_HOSTNAME= if ! lxc image list --format csv | grep -q "$DOCKER_BASE_IMAGE_NAME"; then # create the lxd base image. - ./create_lxc_base.sh + if [ "$SKIP_BASE_IMAGE_CREATION" = false ]; then + ./create_lxc_base.sh + fi fi for VIRTUAL_MACHINE in www btcpayserver; do @@ -322,7 +330,6 @@ for VIRTUAL_MACHINE in www btcpayserver; do export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" - source ./project/project_defaults.sh source "$SITE_PATH/site.conf" source ./project/domain_env.sh diff --git a/deployment/update.sh b/deployment/update.sh index 8eeb1b9..2237a89 100755 --- a/deployment/update.sh +++ b/deployment/update.sh @@ -77,7 +77,7 @@ git checkout "$GIT_COMMIT_ON_REMOTE_HOST" cd - # run deploy which backups up everything, but doesnt restart any services. -bash -c "./deploy.sh --stop --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH --backup-www --backup-btcpayserver" +bash -c "./deploy.sh --stop --backup-archive-path=$BTCPAY_RESTORE_ARCHIVE_PATH --backup-www --backup-btcpayserver --skip-base-image" # call the down script (be default it is non-destructuve of user data.) ./down.sh