From 3cf5dc913ae6a323e8394863ac158baae58eab5f Mon Sep 17 00:00:00 2001 From: Dan Sahagian <45240763+dansahagian@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:16:21 -0700 Subject: [PATCH] Improve directory structure --- bin/deploy | 2 +- bin/{deploy_on_server => deploy-on-server} | 2 -- bin/restart-service | 12 ++++++++++++ {bin => fbsurvivor/bin}/cache-current-board | 0 {bin => fbsurvivor/bin}/load-data | 0 {bin => fbsurvivor/bin}/send-reminders | 0 6 files changed, 13 insertions(+), 3 deletions(-) rename bin/{deploy_on_server => deploy-on-server} (98%) create mode 100755 bin/restart-service rename {bin => fbsurvivor/bin}/cache-current-board (100%) rename {bin => fbsurvivor/bin}/load-data (100%) rename {bin => fbsurvivor/bin}/send-reminders (100%) diff --git a/bin/deploy b/bin/deploy index 04379c5..932be80 100755 --- a/bin/deploy +++ b/bin/deploy @@ -27,6 +27,6 @@ rsync -a ./manage.py dan@linode:/opt/fbsurvivor rsync -a ./bin dan@linode:/opt/fbsurvivor rsync -a ./prod.env dan@linode:/opt/fbsurvivor/.env -ssh linode /opt/fbsurvivor/bin/deploy_on_server +ssh linode /opt/fbsurvivor/bin/deploy-on-server curl -X GET -I https://fbsurvivor.com diff --git a/bin/deploy_on_server b/bin/deploy-on-server similarity index 98% rename from bin/deploy_on_server rename to bin/deploy-on-server index 4ae31b8..b1897fb 100755 --- a/bin/deploy_on_server +++ b/bin/deploy-on-server @@ -16,5 +16,3 @@ echo "\nStarting services...\n" sudo systemctl start wsgi-server-fbsurvivor.service sleep 2 - -rm .env diff --git a/bin/restart-service b/bin/restart-service new file mode 100755 index 0000000..45a39c4 --- /dev/null +++ b/bin/restart-service @@ -0,0 +1,12 @@ +#!/bin/zsh + +rsync -a ./prod.env dan@linode:/opt/fbsurvivor/.env + +echo "\nStopping services...\n" +ssh linode sudo systemctl stop wsgi-server-fbsurvivor.service + +echo "\nStarting services...\n" +ssh linode sudo systemctl start wsgi-server-fbsurvivor.service + +sleep 2 +curl -X GET -I https://fbsurvivor.com diff --git a/bin/cache-current-board b/fbsurvivor/bin/cache-current-board similarity index 100% rename from bin/cache-current-board rename to fbsurvivor/bin/cache-current-board diff --git a/bin/load-data b/fbsurvivor/bin/load-data similarity index 100% rename from bin/load-data rename to fbsurvivor/bin/load-data diff --git a/bin/send-reminders b/fbsurvivor/bin/send-reminders similarity index 100% rename from bin/send-reminders rename to fbsurvivor/bin/send-reminders