Skip to content

Instantly share code, notes, and snippets.

@chrisconley
Created August 20, 2012 19:38
Show Gist options
  • Select an option

  • Save chrisconley/3407100 to your computer and use it in GitHub Desktop.

Select an option

Save chrisconley/3407100 to your computer and use it in GitHub Desktop.

Revisions

  1. chrisconley renamed this gist Aug 20, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. chrisconley revised this gist Aug 20, 2012. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -14,13 +14,16 @@ heroku config | grep CLEARDB_DATABASE_URL
    heroku config:add DATABASE_URL='mysql2://aaaaaaa:aaaaaaa@us-cdbr-east.cleardb.com/heroku_aaaaaa?reconnect=true'

    # Now we need to set a few environment variables for the app to run

    # copy the secret key generated from `rake secret`
    rake secret
    # and set the SECRET_TOKEN with it
    heroku config:add SECRET_TOKEN=3688f877842a0e9324c14ea558268290

    # Set your AWS credentials from https://portal.aws.amazon.com/gp/aws/securityCredentials#access_credentials
    heroku config:add AWS_KEY_ID=[your_key_id]
    heroku config:add AWS_KEY=[your_key]

    # Deploy the app to heroku
    git push heroku heroku-demo:master

  3. chrisconley revised this gist Aug 20, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Make sure we're using Ruby 1.9.3 and checkout the heroku-demo branch of our fork
    rvm use 1.9.3
    git clone git://github.com/chrisconley/clockworkraven.git my-raven
    cd my-rave/
    cd my-raven/
    git checkout heroku-demo

    # Create the heroku app and add the Redis and Mysql add-ons
  4. chrisconley revised this gist Aug 20, 2012. 1 changed file with 16 additions and 5 deletions.
    21 changes: 16 additions & 5 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,34 @@
    # Make sure we're using Ruby 1.9.3 and checkout the heroku-demo branch of our fork
    rvm use 1.9.3
    git clone git://github.com/chrisconley/clockworkraven.git my-raven
    cd my-rave/
    git checkout heroku-demo

    # Create the heroku app and add the Redis and Mysql add-ons
    heroku create

    heroku addons:add redistogo:nano
    heroku addons:add cleardb:ignite
    heroku config | grep CLEARDB_DATABASE_URL
    # copy it and change to mysql2
    # Copy the value of CLEARDB_DATABASE_URL and set DATABASE_URL with it
    heroku config | grep CLEARDB_DATABASE_URL
    # Make sure to change the protocol from `mysql://` to `mysql2://`
    heroku config:add DATABASE_URL='mysql2://aaaaaaa:aaaaaaa@us-cdbr-east.cleardb.com/heroku_aaaaaa?reconnect=true'

    # Now we need to set a few environment variables for the app to run
    # copy the secret key generated from `rake secret`
    rake secret
    # copy the secret key into the next line
    # and set the SECRET_TOKEN with it
    heroku config:add SECRET_TOKEN=3688f877842a0e9324c14ea558268290
    # Set your AWS credentials from https://portal.aws.amazon.com/gp/aws/securityCredentials#access_credentials
    heroku config:add AWS_KEY_ID=[your_key_id]
    heroku config:add AWS_KEY=[your_key]
    # Deploy the app to heroku
    git push heroku heroku-demo:master

    # Scale up our background worker needed to send tasks to Mturk
    heroku scale worker=1

    # Bootstrap the db
    heroku run rake db:structure:load
    heroku run rake users:add

    # Add our first user
    heroku run rake users:add
  5. chrisconley renamed this gist Aug 20, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. chrisconley created this gist Aug 20, 2012.
    23 changes: 23 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    rvm use 1.9.3
    git clone git://github.com/chrisconley/clockworkraven.git my-raven
    cd my-rave/
    git checkout heroku-demo

    heroku create

    heroku addons:add redistogo:nano
    heroku addons:add cleardb:ignite
    heroku config | grep CLEARDB_DATABASE_URL
    # copy it and change to mysql2
    heroku config:add DATABASE_URL='mysql2://aaaaaaa:aaaaaaa@us-cdbr-east.cleardb.com/heroku_aaaaaa?reconnect=true'

    rake secret
    # copy the secret key into the next line
    heroku config:add SECRET_TOKEN=3688f877842a0e9324c14ea558268290
    heroku config:add AWS_KEY_ID=[your_key_id]
    heroku config:add AWS_KEY=[your_key]
    git push heroku heroku-demo:master

    heroku scale worker=1
    heroku run rake db:structure:load
    heroku run rake users:add