Sha256: c75a064947541eae2b7b0733119282662bd327154dbb37687d3bdd111f5135e4

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

#!/usr/bin/env sh

if git remote | grep heroku > /dev/null; then
  git push heroku master
else
  APP_NAME="$1"
  REGION="$2"

  if [ APP_NAME == "" ]; then
    read -p "Please provide Heroku application name: " APP_NAME
    if [ APP_NAME == "" ]; then
      echo "¯\_(ツ)_/¯"
      exit 1
    fi
  fi

  heroku apps:create "${APP_NAME}" --region "${REGION}"
  heroku git:remote -a "${APP_NAME}"
  heroku config:set SMTP_ADDRESS=smtp.sendgrid.net \
                    SMTP_DOMAIN=heroku.com \
                    SMTP_PASSWORD=placeholder \
                    SMTP_USERNAME=placeholder \
                    HOST="${APP_NAME}.herokuapp.com"

  heroku addons:create mongolab
  heroku addons:create sendgrid:starter

  SENDGRID_USERNAME=$(heroku config:get SENDGRID_USERNAME)
  SENDGRID_PASSWORD=$(heroku config:get SENDGRID_PASSWORD)
  MONGOLAB_URI=$(heroku config:get MONGOLAB_URI)

  heroku config:set SMTP_USERNAME="${SENDGRID_USERNAME}" \
                    SMTP_PASSWORD="${SENDGRID_PASSWORD}" \
                    MONGODB_URI="${MONGOLAB_URI}"

  git push heroku master
  heroku run rake db:seed
  echo "Done"
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
venice-chr-0.1.5 bin/heroku/deploy