From eed4f926af0f05b788c426835d7b602bf36d168f Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Sun, 6 Oct 2024 16:02:46 -0400 Subject: [PATCH] Update Environment variables and enable backups. --- deployment/create_base.sh | 2 +- deployment/down.sh | 6 +++--- deployment/up.sh | 4 ++++ install.sh | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/deployment/create_base.sh b/deployment/create_base.sh index f2dd92d..493d322 100755 --- a/deployment/create_base.sh +++ b/deployment/create_base.sh @@ -35,7 +35,7 @@ else # TODO move this sovereign-stack-base construction VM to separate dedicated IP incus config set "$BASE_IMAGE_VM_NAME" --project default incus start "$BASE_IMAGE_VM_NAME" --project default - sleep 15 + sleep 30 fi # for CHAIN in mainnet testnet; do diff --git a/deployment/down.sh b/deployment/down.sh index 6b49ab9..91d5933 100755 --- a/deployment/down.sh +++ b/deployment/down.sh @@ -120,14 +120,14 @@ echo "SERVERS: $SERVERS" echo "BACKUP_WWW_APPS: $BACKUP_WWW_APPS" -# let's grab a snapshot of the +# let's grab a backup of the www if [ "$BACKUP_WWW_APPS" = true ]; then SNAPSHOT_ID=$(cat /dev/urandom | tr -dc 'a-aA-Z' | fold -w 6 | head -n 1) incus storage volume snapshot create ss-base www-ss-data "$SNAPSHOT_ID" BACKUP_LOCATION="$HOME/ss/backups" mkdir -p "$BACKUP_LOCATION" - #incus storage volume export ss-base "www-ss-data" "$BACKUP_LOCATION/project-$(incus project list --format csv | grep "(current)" | awk '{print $1}')_www-ss-data_""$(date +%s)"".tar.gz" - #incus storage volume snapshot delete ss-base "www-ss-data" "$SNAPSHOT_ID" + incus storage volume export ss-base "www-ss-data" "$BACKUP_LOCATION/project-$(incus project list --format csv | grep "(current)" | awk '{print $1}')_www-ss-data_""$(date +%s)"".tar.gz" + incus storage volume snapshot delete ss-base "www-ss-data" "$SNAPSHOT_ID" fi if [[ "$SERVERS" == *"www"* && "$SERVERS" == *"btcpay"* ]]; then diff --git a/deployment/up.sh b/deployment/up.sh index b8c2703..0d2f554 100755 --- a/deployment/up.sh +++ b/deployment/up.sh @@ -198,6 +198,7 @@ SITE_LANGUAGE_CODES="en" DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)" DEPLOY_GHOST=true +DEPLOY_CLBOSS_PLUGIN=true DEPLOY_NEXTCLOUD=false DEPLOY_NOSTR=false NOSTR_ACCOUNT_PUBKEY= @@ -411,6 +412,9 @@ done if [ "$SKIP_BTCPAY_SERVER" = false ]; then if [ -n "$BTCPAY_SERVER_MAC_ADDRESS" ]; then export DOCKER_HOST="ssh://ubuntu@$BTCPAY_SERVER_FQDN" + export DOMAIN_NAME="$DOMAIN_NAME" + export SITE_PATH="$SITES_PATH/$PRIMARY_DOMAIN" + export DEPLOY_CLBOSS_PLUGIN="$DEPLOY_CLBOSS_PLUGIN" ./project/btcpayserver/go.sh fi fi diff --git a/install.sh b/install.sh index 79ec641..53d08e5 100755 --- a/install.sh +++ b/install.sh @@ -14,8 +14,8 @@ fi # ensure the iptables forward policy is set to ACCEPT so your host can act as a router # Note this is necessary if docker is running (or has been previuosly installed) on the # same host running incus. -sudo iptables -F FORWARD -sudo iptables -P FORWARD ACCEPT +#sudo iptables -F FORWARD +#sudo iptables -P FORWARD ACCEPT # run the incus install script. sudo bash -c ./install_incus.sh