Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom meteor application deployment script
#!/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