Created
March 21, 2014 03:09
Revisions
-
monfresh created this gist
Mar 21, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ while getopts ":a:o:" opt; do case $opt in a) echo "Getting ready to set environment variables for $2" echo "Setting CANONICAL_URL" heroku config:set CANONICAL_URL=$2.herokuapp.com --app $2 echo "Setting DOMAIN_NAME" heroku config:set DOMAIN_NAME=herokuapp.com --app $2 echo "Setting SECRET_TOKEN" token2=$(cat /dev/random | LC_CTYPE=C tr -dc "[:alnum:]" | head -c 128) heroku config:set SECRET_TOKEN=$token2 --app $2 echo "Getting ready to install add-ons for $2" echo "Installing Mandrill by MailChimp" heroku addons:add mandrill --app $2 echo "Installing Memcachier" heroku addons:add memcachier --app $2 echo "Installing New Relic" heroku addons:add newrelic --app $2 ;; o) echo "Setting OHANA_API_ENDPOINT" heroku config:set OHANA_API_ENDPOINT=$4 --app $2 ;; \?) echo "Invalid option: -$OPTARG" >&2 echo "Usage: setup_heroku -a your_app_name -o your_api_endpoint" >&2 exit 1 ;; :) echo "Option -$OPTARG requires an argument" >&2 echo "Usage: setup_heroku -a your_app_name -o your_api_endpoint" >&2 exit 1 ;; esac done