From 05d23dabcbefaab37c9072f23fdc8e5b9d4d4dad Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Tue, 10 May 2022 12:05:04 -0400 Subject: [PATCH] Removed all Matrix/Synapse functionality. Going to integrate NOSTR instead. Signed-off-by: Derek Smith --- go_www.sh | 37 ++-------------------------------- provision_vps.sh | 2 -- shared.sh | 18 +---------------- stub_docker_yml.sh | 47 ------------------------------------------- stub_nginxconf.sh | 50 ---------------------------------------------- 5 files changed, 3 insertions(+), 151 deletions(-) diff --git a/go_www.sh b/go_www.sh index 74a1708..7e02e8d 100755 --- a/go_www.sh +++ b/go_www.sh @@ -54,28 +54,6 @@ if [ "$RUN_RESTORE" = true ]; then ./restore_www.sh fi -NEW_MATRIX_DEPLOYMENT=false -if [ "$DEPLOY_MATRIX" = true ]; then - if ! ssh "$FQDN" "[ -d $REMOTE_HOME/matrix ]"; then - NEW_MATRIX_DEPLOYMENT=true - ssh "$FQDN" "mkdir $REMOTE_HOME/matrix && mkdir $REMOTE_HOME/matrix/db && mkdir $REMOTE_HOME/matrix/data" - - docker run -it --rm -v "$REMOTE_HOME/matrix/data":/data \ - -e SYNAPSE_SERVER_NAME="${DOMAIN_NAME}" \ - -e SYNAPSE_REGISTRATION_SHARED_SECRET="${MATRIX_SHARED_SECRET}" \ - -e SYNAPSE_REPORT_STATS=yes \ - -e POSTGRES_PASSWORD="${MATRIX_DB_PASSWORD}" \ - -e SYNAPSE_NO_TLS=1 \ - -e SYNAPSE_ENABLE_REGISTRATION=yes \ - -e SYNAPSE_LOG_LEVEL=WARNING \ - -e POSTGRES_DB=synapse \ - -e POSTGRES_HOST=matrix-db \ - -e POSTGRES_USER=synapse \ - -e POSTGRES_PASSWORD="${MATRIX_DB_PASSWORD}" \ - "$MATRIX_IMAGE" generate - fi -fi - if [ "$DEPLOY_ONION_SITE" = true ]; then # ensure the tor image is built docker build -t tor:latest ./tor @@ -105,19 +83,8 @@ if [ "$RUN_SERVICES" = true ]; then docker stack deploy -c "$DOCKER_YAML_PATH" webstack # start a browser session; point it to port 80 to ensure HTTPS redirect. - wait-for-it -t 320 "$DOMAIN_NAME:80" - wait-for-it -t 320 "$DOMAIN_NAME:443" - - if [ "$DEPLOY_MATRIX" = true ]; then - # If this is a new Matrix deployment, then we should add the default admin user. - if [ $NEW_MATRIX_DEPLOYMENT = true ]; then - # get the container ID for matrix/synapse. - MATRIX_CONTAINER_ID="$(docker ps | grep matrixdotorg | awk '{print $1;}')" - - # create the user. - docker exec -it "$MATRIX_CONTAINER_ID" register_new_matrix_user http://localhost:8008 -u "$ADMIN_ACCOUNT_USERNAME" -p "$MATRIX_ADMIN_PASSWORD" -a --config /data/homeserver.yaml - fi - fi + wait-for-it -t 320 "$FQDN:80" + wait-for-it -t 320 "$FQDN:443" # open bowser tabs. if [ "$DEPLOY_GHOST" = true ]; then diff --git a/provision_vps.sh b/provision_vps.sh index 4afa9b9..92c5beb 100755 --- a/provision_vps.sh +++ b/provision_vps.sh @@ -35,8 +35,6 @@ if [ -z "$AWS_SECRET_ACCESS_KEY" ]; then exit 1 fi -# ports: All ports go to nginx; 8448 directs to the matrix federation servoce. - # Note, we assume the script has already made sure the machine doesn't exist. if [ "$APP_TO_DEPLOY" = www ] || [ "$APP_TO_DEPLOY" = certonly ]; then # creates a public VM in AWS and provisions the bcm website. diff --git a/shared.sh b/shared.sh index 5cd833e..848306e 100755 --- a/shared.sh +++ b/shared.sh @@ -33,15 +33,11 @@ export NEXTCLOUD_MYSQL_PASSWORD="$(new_pass)" export GITEA_MYSQL_PASSWORD="$(new_pass)" export NEXTCLOUD_MYSQL_ROOT_PASSWORD="$(new_pass)" #export GITEA_MYSQL_ROOT_PASSWORD="$(new_pass)" -export MATRIX_DB_PASSWORD="$(new_pass)" -export MATRIX_SHARED_SECRET="$(new_pass)" -export MATRIX_ADMIN_PASSWORD="$(new_pass)" export DUPLICITY_BACKUP_PASSPHRASE="$(new_pass)" #export DEPLOY_WWW_SERVER=false #export DEPLOY_BTCPAY_SERVER=false #export DEPLOY_UMBREL_VPS=false export DEPLOY_GHOST=true -export DEPLOY_MATRIX=true export DEPLOY_NOSTR=false export DEPLOY_NEXTCLOUD=true export DEPLOY_ONION_SITE=false @@ -93,7 +89,6 @@ fi # TODO, ensure VPS_HOSTING_TARGET is in range. export NEXTCLOUD_FQDN="$NEXTCLOUD_HOSTNAME.$DOMAIN_NAME" -export MATRIX_FQDN="$MATRIX_HOSTNAME.$DOMAIN_NAME" export GITEA_FQDN="$GITEA_HOSTNAME.$DOMAIN_NAME" export NOSTR_FQDN="$NOSTR_HOSTNAME.$DOMAIN_NAME" @@ -184,18 +179,6 @@ if [ "$DEPLOY_NEXTCLOUD" = true ]; then fi fi -if [ "$DEPLOY_MATRIX" = true ]; then - if [ -z "$MATRIX_ADMIN_PASSWORD" ]; then - echo "ERROR: Ensure MATRIX_ADMIN_PASSWORD is configured in your site_definition." - exit 1 - fi - - if [ -z "$MATRIX_DB_PASSWORD" ]; then - echo "ERROR: Ensure MATRIX_DB_PASSWORD is configured in your site_definition." - exit 1 - fi -fi - if [ "$DEPLOY_NOSTR" = true ]; then if [ -z "$NOSTR_ADMIN_ACCOUNT_PUBKEY" ]; then echo "ERROR: Ensure NOSTR_ADMIN_ACCOUNT_PUBKEY is configured in your site_definition." @@ -249,3 +232,4 @@ if [ -z "$NOSTR_ACCOUNT_PUBKEY" ]; then echo "INFO: Go to your site_definition file and set the NOSTR_ACCOUNT_PUBKEY variable." exit 1 fi + diff --git a/stub_docker_yml.sh b/stub_docker_yml.sh index d42991b..36a635c 100755 --- a/stub_docker_yml.sh +++ b/stub_docker_yml.sh @@ -110,39 +110,6 @@ cat >>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$DOCKER_YAML_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <>"$NGINX_CONF_PATH" <