The rest of it.

This commit is contained in:
Derek Smith 2023-04-04 11:10:38 -04:00
parent e8303a54a1
commit 73ec75a9f2
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 10 additions and 14 deletions

View File

@ -50,7 +50,6 @@ REMOTE_NAME="$(lxc remote get-default)"
STOP_SERVICES=false STOP_SERVICES=false
USER_SAYS_YES=false USER_SAYS_YES=false
RESTART_FRONT_END=true RESTART_FRONT_END=true
USER_TARGET_PROJECT=
# grab any modifications from the command line. # grab any modifications from the command line.
for i in "$@"; do for i in "$@"; do
@ -64,7 +63,6 @@ for i in "$@"; do
RESTORE_CERTS=true RESTORE_CERTS=true
BACKUP_APPS=false BACKUP_APPS=false
RUN_CERT_RENEWAL=false RUN_CERT_RENEWAL=false
RESTART_FRONT_END=true
shift shift
;; ;;
--restore-btcpay) --restore-btcpay)
@ -303,7 +301,6 @@ stub_site_definition
# bring the VMs up under the primary domain name. # bring the VMs up under the primary domain name.
export UPDATE_BTCPAY="$UPDATE_BTCPAY" export UPDATE_BTCPAY="$UPDATE_BTCPAY"
export RECONFIGURE_BTCPAY_SERVER="$RECONFIGURE_BTCPAY_SERVER"
# iterate over all our server endpoints and provision them if needed. # iterate over all our server endpoints and provision them if needed.
# www # www

View File

@ -60,6 +60,15 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
fi fi
fi fi
if [ "$DEPLOY_NOSTR" = true ]; then
if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then
echo "ERROR: When deploying nostr, you MUST specify NOSTR_ACCOUNT_PUBKEY."
exit 1
fi
fi
if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then if [ -z "$DUPLICITY_BACKUP_PASSPHRASE" ]; then
echo "ERROR: Ensure DUPLICITY_BACKUP_PASSPHRASE is configured in your site.conf." echo "ERROR: Ensure DUPLICITY_BACKUP_PASSPHRASE is configured in your site.conf."
exit 1 exit 1
@ -85,16 +94,6 @@ fi
# ok, the backend stacks are stopped. # ok, the backend stacks are stopped.
if [ "$RESTART_FRONT_END" = true ]; then if [ "$RESTART_FRONT_END" = true ]; then
# remove the nginx stack
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
sleep 2
docker stack rm reverse-proxy
# wait for all docker containers to stop.
# TODO see if there's a way to check for this.
sleep 20
fi
# generate the certs and grab a backup # generate the certs and grab a backup
if [ "$RUN_CERT_RENEWAL" = true ] && [ "$RESTORE_CERTS" = false ]; then if [ "$RUN_CERT_RENEWAL" = true ] && [ "$RESTORE_CERTS" = false ]; then
@ -115,7 +114,7 @@ if [ "$RESTART_FRONT_END" = true ]; then
source ../domain_env.sh source ../domain_env.sh
# these variable are used by both backup/restore scripts. # these variable are used by both backup/restore scripts.
export REMOTE_BACKUP_PATH="$REMOTE_HOME/backups/www/$APP/$DOMAIN_IDENTIFIER" export REMOTE_BACKUP_PATH="$REMOTE_BACKUP_PATH/www/$APP/$DOMAIN_IDENTIFIER"
export REMOTE_SOURCE_BACKUP_PATH="$REMOTE_DATA_PATH/$APP/$DOMAIN_NAME" export REMOTE_SOURCE_BACKUP_PATH="$REMOTE_DATA_PATH/$APP/$DOMAIN_NAME"
# ensure our local backup path exists so we can pull down the duplicity archive to the management machine. # ensure our local backup path exists so we can pull down the duplicity archive to the management machine.