Custom meteor application deployment script
This file contains 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 | |
dst=/path/to/nodejs/dir | |
buildDir=result-cyclo-meteor | |
archiveName=test.tar.gz | |
remoteForeverProcessId=24 | |
echo "Creating build" | |
meteor build .. | |
echo "OK" | |
echo "Uploading build" | |
scp ../$archiveName server-perso:$dst | |
echo "OK" | |
echo "Deploying build" | |
ssh vps-perso bash -c "' | |
cd $dst | |
forever stop $remoteForeverProcessId | |
rm -rf $buildDir.old | |
mv $buildDir $buildDir.old | |
mkdir $buildDir | |
tar xzf $archiveName -C $buildDir | |
cp $buildDir.old/start-meteor.backup.sh $buildDir/ | |
cd $buildDir/bundle/programs/server/ | |
npm install | |
cd npm/npm-bcrypt | |
rm -rf node_modules/bcrypt | |
npm install bcrypt | |
cd $dst$buildDir | |
sh start-meteor.backup.sh | |
'" | |
echo "OK" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment