1
1

Compare commits

...

2 Commits

Author SHA1 Message Date
902121a72d
Fix --no-backup-www bug. 2023-01-07 09:39:20 -05:00
9a419ccc6e
Deploy nostr relay when -n NOSTR_ACCOUNT_PUBKEY. 2023-01-07 09:37:55 -05:00
9 changed files with 12 additions and 16 deletions

View File

@ -6,7 +6,7 @@ export WWW_SERVER_MAC_ADDRESS=
export DEPLOY_WWW_SERVER=false export DEPLOY_WWW_SERVER=false
export DEPLOY_BTCPAY_SERVER=false export DEPLOY_BTCPAY_SERVER=false
export DEPLOY_GHOST=false export DEPLOY_GHOST=false
export DEPLOY_NOSTR_RELAY=false
export DEPLOY_ONION_SITE=false export DEPLOY_ONION_SITE=false
export DEPLOY_NEXTCLOUD=false export DEPLOY_NEXTCLOUD=false
export DEPLOY_GITEA=false export DEPLOY_GITEA=false

View File

@ -293,7 +293,6 @@ export SITE_LANGUAGE_CODES="en"
export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)" export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)"
export DEPLOY_GHOST=true export DEPLOY_GHOST=true
export DEPLOY_NEXTCLOUD=false export DEPLOY_NEXTCLOUD=false
export DEPLOY_NOSTR_RELAY=false
export NOSTR_ACCOUNT_PUBKEY="NOSTR_IDENTITY_PUBKEY_GOES_HERE" export NOSTR_ACCOUNT_PUBKEY="NOSTR_IDENTITY_PUBKEY_GOES_HERE"
export DEPLOY_GITEA=false export DEPLOY_GITEA=false
#export DEPLOY_ONION_SITE=false #export DEPLOY_ONION_SITE=false

View File

@ -25,7 +25,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
DOMAIN_STRING="-d $DOMAIN_NAME -d $WWW_FQDN -d $BTCPAY_USER_FQDN" DOMAIN_STRING="-d $DOMAIN_NAME -d $WWW_FQDN -d $BTCPAY_USER_FQDN"
if [ "$DEPLOY_NEXTCLOUD" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NEXTCLOUD_FQDN"; fi if [ "$DEPLOY_NEXTCLOUD" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NEXTCLOUD_FQDN"; fi
if [ "$DEPLOY_GITEA" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $GITEA_FQDN"; fi if [ "$DEPLOY_GITEA" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $GITEA_FQDN"; fi
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NOSTR_FQDN"; fi if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then DOMAIN_STRING="$DOMAIN_STRING -d $NOSTR_FQDN"; fi
# if BTCPAY_ALT_NAMES has been set by the admin, iterate over the list # if BTCPAY_ALT_NAMES has been set by the admin, iterate over the list
# and append the domain names to the certbot request # and append the domain names to the certbot request

View File

@ -55,12 +55,10 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
fi fi
fi fi
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then
if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then
echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition." echo "ERROR: Ensure NOSTR_ACCOUNT_PUBKEY is configured in your site_definition."
exit 1 exit 1
fi 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_definition." echo "ERROR: Ensure DUPLICITY_BACKUP_PASSPHRASE is configured in your site_definition."

View File

@ -40,7 +40,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
if [ "$RESTORE_WWW" = true ]; then if [ "$RESTORE_WWW" = true ]; then
./restore_path.sh ./restore_path.sh
#ssh "$PRIMARY_WWW_FQDN" sudo chown ubuntu:ubuntu "$REMOTE_HOME/$APP" #ssh "$PRIMARY_WWW_FQDN" sudo chown ubuntu:ubuntu "$REMOTE_HOME/$APP"
else elif [ "$BACKUP_APPS" = true ]; then
# if we're not restoring, then we may or may not back up. # if we're not restoring, then we may or may not back up.
./backup_path.sh ./backup_path.sh
fi fi

View File

@ -191,7 +191,7 @@ EOL
EOL EOL
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then
cat >>"$NGINX_CONF_PATH" <<EOL cat >>"$NGINX_CONF_PATH" <<EOL
# We return a JSON object with name/pubkey mapping per NIP05. # We return a JSON object with name/pubkey mapping per NIP05.
# https://www.reddit.com/r/nostr/comments/rrzk76/nip05_mapping_usernames_to_dns_domains_by_fiatjaf/sssss # https://www.reddit.com/r/nostr/comments/rrzk76/nip05_mapping_usernames_to_dns_domains_by_fiatjaf/sssss
@ -199,7 +199,7 @@ EOL
location = /.well-known/nostr.json { location = /.well-known/nostr.json {
add_header Content-Type application/json; add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
return 200 '{ "names": { "_": "${NOSTR_ACCOUNT_PUBKEY}" } }'; return 200 '{ "names": { "_": "${NOSTR_ACCOUNT_PUBKEY}" }, "relays": { "${NOSTR_ACCOUNT_PUBKEY}": [ "wss://${NOSTR_FQDN}" ] } }';
} }
EOL EOL
@ -218,7 +218,7 @@ EOL
EOL EOL
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then
cat >>"$NGINX_CONF_PATH" <<EOL cat >>"$NGINX_CONF_PATH" <<EOL
# wss://$NOSTR_FQDN server block # wss://$NOSTR_FQDN server block
server { server {

View File

@ -47,7 +47,7 @@ EOL
EOL EOL
fi fi
if [ "$DEPLOY_NOSTR_RELAY" = "true" ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then
cat >> "$DOCKER_YAML_PATH" <<EOL cat >> "$DOCKER_YAML_PATH" <<EOL
- nostrnet-$DOMAIN_IDENTIFIER-en - nostrnet-$DOMAIN_IDENTIFIER-en
EOL EOL
@ -118,7 +118,7 @@ EOL
EOL EOL
fi fi
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then
cat >> "$DOCKER_YAML_PATH" <<EOL cat >> "$DOCKER_YAML_PATH" <<EOL
nostrnet-$DOMAIN_IDENTIFIER-en: nostrnet-$DOMAIN_IDENTIFIER-en:
attachable: true attachable: true

View File

@ -14,7 +14,7 @@ for DOMAIN_NAME in ${DOMAIN_LIST//,/ }; do
source "$SITE_PATH/site_definition" source "$SITE_PATH/site_definition"
source "$RESPOSITORY_PATH/domain_env.sh" source "$RESPOSITORY_PATH/domain_env.sh"
if [ "$DEPLOY_NOSTR_RELAY" = true ]; then if [ -n "$NOSTR_ACCOUNT_PUBKEY" ]; then
REMOTE_NOSTR_PATH="$REMOTE_HOME/nostr" REMOTE_NOSTR_PATH="$REMOTE_HOME/nostr"
NOSTR_PATH="$REMOTE_NOSTR_PATH/$DOMAIN_NAME" NOSTR_PATH="$REMOTE_NOSTR_PATH/$DOMAIN_NAME"
NOSTR_CONFIG_PATH="$SITE_PATH/webstack/nostr.config" NOSTR_CONFIG_PATH="$SITE_PATH/webstack/nostr.config"

View File

@ -7,7 +7,6 @@ export DUPLICITY_BACKUP_PASSPHRASE=
export BTCPAY_HOSTNAME_IN_CERT= export BTCPAY_HOSTNAME_IN_CERT=
export DEPLOY_GHOST=true export DEPLOY_GHOST=true
export DEPLOY_NEXTCLOUD=false export DEPLOY_NEXTCLOUD=false
export DEPLOY_NOSTR_RELAY=true
export NOSTR_ACCOUNT_PUBKEY= export NOSTR_ACCOUNT_PUBKEY=
export DEPLOY_GITEA=false export DEPLOY_GITEA=false
export DEPLOY_ONION_SITE=false export DEPLOY_ONION_SITE=false