set -e

if [ -d /bundle ]; then
  cd /bundle
  tar xzf *.tar.gz
  cd /bundle/bundle/programs/server/
  npm i
  cd /bundle/bundle/
else
  cd /built_app
fi

export PORT=80
echo "starting meteor app on port:$PORT"
node main.js

set -e

if [ -d /bundle ]; then
  cd /bundle
  tar xzf *.tar.gz
  cd /bundle/bundle/programs/server/
  npm i
  cd /bundle/bundle/
elif [[ $BUNDLE_URL ]]; then
  cd /tmp
  wget $BUNDLE_URL -O bundle.tar.gz
  tar xzf bundle.tar.gz
  cd /tmp/bundle/programs/server/
  npm i
  cd /tmp/bundle/
else
  cd /built_app
fi

export PORT=80
echo "starting meteor app on port:$PORT"
node main.js

Add support for BUNDLE_URL based deployment
Add support for BUNDLE_URL based deployment
