public
Created

meteorite deploy to appfog with bundled dependencies

  • Download Gist
af-deploy.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/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"
package.json
JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{
"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"
}
}
package_deploy.json
JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"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"
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.