Deploy nostr relay when -n NOSTR_ACCOUNT_PUBKEY.
This commit is contained in:
parent
59ca96cb6c
commit
9a419ccc6e
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -55,11 +55,9 @@ 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
|
||||||
|
@ -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 {
|
||||||
|
@ -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
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user