Login to heroku with your credentials:
heroku loginIn addition to the steps below, for each environment, set an environment variable called DATABASE_URL,
the value of which should reflect the environment's CLEARDB_DATABASE_URL,
except it should use mysql2: instead of mysql:.
heroku create next-train-staging
heroku git:remote -a next-train-staging
git remote rename heroku heroku-staging
heroku config:set BUNDLE_WITHOUT="development:test:docs" -a next-train-staging
heroku config:set GTFS_SOURCE_URL="http://www.shorelineeast.com/google_transit.zip" -a next-train-staging
heroku config:set MAILER_HOST="next-train-staging.herokuapp.com" -a next-train-staging
heroku config:set ADMIN_EMAIL="someone@gmail.com" -a next-train-staging
heroku addons:create cleardb:ignite -a next-train-staging
heroku addons:create sendgrid:starter -a next-train-staging
heroku addons:create scheduler:standard -a next-train-stagingheroku create next-train-production
heroku git:remote -a next-train-production
git remote rename heroku heroku-production
heroku config:set BUNDLE_WITHOUT="development:test:docs" -a next-train-production
heroku config:set GTFS_SOURCE_URL="http://www.shorelineeast.com/google_transit.zip" -a next-train-production
heroku config:set MAILER_HOST="next-train-production.herokuapp.com" -a next-train-production
heroku config:set ADMIN_EMAIL="someone@gmail.com" -a next-train-production
heroku addons:create cleardb:ignite -a next-train-production
heroku addons:create sendgrid:starter -a next-train-production
heroku addons:create scheduler:standard -a next-train-productionDeploy from master branch:
git push heroku-staging master
git push heroku-production masterDeploy from a different branch:
git push heroku-staging my-branch:master
git push heroku-production my-branch:masterBoth production and staging environment should schedule the following tasks:
| task | frequency |
|---|---|
rake gtfs:import |
once per hour |