1
1

Update Environment variables and enable backups.

This commit is contained in:
Derek Smith 2024-10-06 16:02:46 -04:00
parent 29f5b56223
commit eed4f926af
4 changed files with 10 additions and 6 deletions

View File

@ -35,7 +35,7 @@ else
# TODO move this sovereign-stack-base construction VM to separate dedicated IP # TODO move this sovereign-stack-base construction VM to separate dedicated IP
incus config set "$BASE_IMAGE_VM_NAME" --project default incus config set "$BASE_IMAGE_VM_NAME" --project default
incus start "$BASE_IMAGE_VM_NAME" --project default incus start "$BASE_IMAGE_VM_NAME" --project default
sleep 15 sleep 30
fi fi
# for CHAIN in mainnet testnet; do # for CHAIN in mainnet testnet; do

View File

@ -120,14 +120,14 @@ echo "SERVERS: $SERVERS"
echo "BACKUP_WWW_APPS: $BACKUP_WWW_APPS" 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 if [ "$BACKUP_WWW_APPS" = true ]; then
SNAPSHOT_ID=$(cat /dev/urandom | tr -dc 'a-aA-Z' | fold -w 6 | head -n 1) 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" incus storage volume snapshot create ss-base www-ss-data "$SNAPSHOT_ID"
BACKUP_LOCATION="$HOME/ss/backups" BACKUP_LOCATION="$HOME/ss/backups"
mkdir -p "$BACKUP_LOCATION" 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 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 snapshot delete ss-base "www-ss-data" "$SNAPSHOT_ID"
fi fi
if [[ "$SERVERS" == *"www"* && "$SERVERS" == *"btcpay"* ]]; then if [[ "$SERVERS" == *"www"* && "$SERVERS" == *"btcpay"* ]]; then

View File

@ -198,6 +198,7 @@ SITE_LANGUAGE_CODES="en"
DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)" DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)"
DEPLOY_GHOST=true DEPLOY_GHOST=true
DEPLOY_CLBOSS_PLUGIN=true
DEPLOY_NEXTCLOUD=false DEPLOY_NEXTCLOUD=false
DEPLOY_NOSTR=false DEPLOY_NOSTR=false
NOSTR_ACCOUNT_PUBKEY= NOSTR_ACCOUNT_PUBKEY=
@ -411,6 +412,9 @@ done
if [ "$SKIP_BTCPAY_SERVER" = false ]; then if [ "$SKIP_BTCPAY_SERVER" = false ]; then
if [ -n "$BTCPAY_SERVER_MAC_ADDRESS" ]; then if [ -n "$BTCPAY_SERVER_MAC_ADDRESS" ]; then
export DOCKER_HOST="ssh://ubuntu@$BTCPAY_SERVER_FQDN" 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 ./project/btcpayserver/go.sh
fi fi
fi fi

View File

@ -14,8 +14,8 @@ fi
# ensure the iptables forward policy is set to ACCEPT so your host can act as a router # 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 # Note this is necessary if docker is running (or has been previuosly installed) on the
# same host running incus. # same host running incus.
sudo iptables -F FORWARD #sudo iptables -F FORWARD
sudo iptables -P FORWARD ACCEPT #sudo iptables -P FORWARD ACCEPT
# run the incus install script. # run the incus install script.
sudo bash -c ./install_incus.sh sudo bash -c ./install_incus.sh