Skip to content

Instantly share code, notes, and snippets.

@nate-strauser
Created March 3, 2013 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nate-strauser/5074073 to your computer and use it in GitHub Desktop.
Save nate-strauser/5074073 to your computer and use it in GitHub Desktop.
meteorite deploy to appfog with bundled dependencies
#!/bin/bash
app=${1}
npm install
echo "Bundling $app"
mrt bundle bundle.tar.gz
tar -xzf bundle.tar.gz
rm -rf bundle.tar.gz
pushd bundle
echo "Fixing bundle for appfog"
rm -rf server/node_modules/fibers
cp ../package_deploy.json ./package.json
npm install
npm shrinkwrap
echo "Updating appfog"
af update $app
echo "Cleaning up"
popd
rm -rf bundle
echo "Deployment complete"
{
"name": "NAME",
"version": "0.0.1",
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
},
"dependencies":{
"aws-sdk": "0.9.x",
"zencoder": "0.0.x",
"analytics-node": "*"
},
"scripts":{
"postinstall": "rm -rf public/node_modules && mv node_modules public/node_modules"
}
}
{
"name": "NAME",
"version": "0.0.1",
"engines": {
"node": "0.8.x",
"npm": "1.1.x"
},
"dependencies":{
"aws-sdk": "0.9.x",
"zencoder": "0.0.x",
"analytics-node": "*",
"fibers": "0.6.9"
},
"scripts":{
"start":"node main.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment