Last active
September 22, 2018 17:15
-
-
Save davidworkman9/6466734 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
start on runlevel [2345] | |
stop on runlevel [06] | |
respawn | |
respawn limit 10 5 | |
script | |
APP_DIR=/var/www/bundle | |
LOG_FILE=/var/log/meteorApp.log | |
export PORT=80 | |
export MONGO_URL=mongodb://localhost:27001/meteor # replace with your mongo database | |
export ROOT_URL=http://#yourdomainhere | |
node $APP_DIR/main.js 2>&1 >> $LOG_FILE | |
end script |
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
notify-send 'Update Started' | |
ssh -i ~/.ssh/yourSSHKey.pem [email protected] << 'ENDSSH' | |
~/updateApp.sh | |
ENDSSH | |
notify-send 'Meteor App Updated' |
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
cd /var/www/ #insert your git repo location here | |
git pull | |
meteor bundle app.tgz | |
mv app.tgz ../ | |
rm -r bundle/ | |
tar -xzf app.tgz | |
rm app.tgz | |
#restart the service | |
sudo service meteorApp stop | |
sudo service meteorApp start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment