Created
August 20, 2012 19:38
-
-
Save chrisconley/3407100 to your computer and use it in GitHub Desktop.
Deploying Twitter's Clockwork Raven to Heroku
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 characters
# 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-raven/ | |
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 | |
# 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:[email protected]/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 | |
# Scale up our background worker needed to send tasks to Mturk | |
heroku scale worker=1 | |
# Bootstrap the db | |
heroku run rake db:structure:load | |
# Add our first user | |
heroku run rake users:add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment