diff --git a/scripts/create-heroku-app b/scripts/create-heroku-app old mode 100644 new mode 100755 index 463fc06..21d3284 --- a/scripts/create-heroku-app +++ b/scripts/create-heroku-app @@ -1,7 +1,13 @@ #!/bin/bash +# Creates a new Heroku app and adds it as a git remote. +# The environment name could be staging, production, etc +# +# Usage: create-heroku-app + APP=$1 ENV=$2 +TEAM=$3 fail() { @@ -29,15 +35,18 @@ if [ -z "$ENV" ] ; then fail "Missing Heroku remote (environment name) parameter" fi -heroku apps:create --buildpack https://github.com/okgrow/meteor-buildpack-horse.git -r $ENV $APP || fail +if [ -z "$TEAM" ] ; then + fail "Missing Heroku team name parameter" +fi + +heroku apps:create --buildpack https://github.com/okgrow/meteor-buildpack-horse.git -r $ENV $APP --team $TEAM || fail heroku_command addons:create mongolab heroku_command config:add ROOT_URL="https://$APP.herokuapp.com" heroku_command config:add ENV=$ENV heroku_command labs:enable http-session-affinity -#heroku_command labs:enable log-runtime-metrics heroku_command addons:create logentries:le_tryit heroku_command addons:create mailgun:starter heroku_command addons:create scheduler:standard -message "To make this your default Heroku environment: git config heroku.remote $ENV" \ No newline at end of file +message "To make this your default Heroku environment: git config heroku.remote $ENV"