Created
February 19, 2018 20:26
-
-
Save ishan-marikar/e8348e0cc3c83e244fe71a77cd172c3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd .. | |
echo "[!] Stopping existing application" | |
ssh [email protected] "pm2 stop x-backend" | |
echo "[!] Removing existing folder" | |
ssh [email protected] "rm -rf /home/ubuntu/backend" | |
echo "[!] Copying files.." | |
rsync -azP backend [email protected]:/home/ubuntu/ -vv --exclude node_modules --exclude misc | |
echo "[!] Runing yarn on files.." | |
ssh [email protected] "cd /home/ubuntu/backend && yarn" | |
echo "[!] Restarting PM2.." | |
ssh [email protected] "pm2 restart x-backend" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment