-
Deploy the app to heroku following heroku normal instructions (add link to heroku help)
-
Set heroku environment variables
Make sure all the options in
config.ymlare properly set then run:bundle exec rake heroku:configCopy, paste and run the generated command
-
Remove postgres addon
heroku addons:destroy heroku-postgresql -
Addons: MemCachier (free) and SSL ($20)
heroku addon:create memcachier:dev heroku addons:create ssl:endpoint -
Addons: New Relic
heroku addon:create newrelic:wayneOpen the addon by running
heroku addon:open newrelicClick on the top-right dropdown menu and select "Account Settings". On your account page, copy your License key. Open
config/newrelic.ymlto setlicense_keyvariable value to your license. -
Addon: Flying Sphinx ($55)
heroku addons:create flying_sphinx:ceramicCeramic plan is needed for Delta indexes. If you can manage without Delta Indexing, smaller plan is also ok
-
Addon: MySQL
heroku addon:create cleardb:igniteNow get your database url by running
heroku config:get CLEARDB_DATABASE_URLCopy the value of CLEARDB_DATABASE_URL returned and CHANGE the adapter from
mysql://tomysql2://(there's a 2 there). Then set the value of DATABASE_URL environment variable.heroku config:add DATABASE_URL='mysql2://{the rest of your connection string}'And initialize your database
heroku run bundle exec rake db:schema:load -
Addon: Heroku scheduler
heroku addon:create scheduler:standardOpen the scheduler
heroku addon:open schedulerAnd add the following jobs
Job Frequency flying-sphinx index hourly rails runner "CommunityMailer.deliver_community_updates" Daily rake sharetribe:delete_expired_auth_tokens Daily
- web: Standard-2X
- worker: Standard-2X
Thanks. It took some doing, but I got this to deploy on Heroku. Thank you for the comprehensive guide. I will say that I had to remove the environment variable from the passenger max-pool-size to get this to work. If you run into deployment problems, consider changing the first line of Procfile to read:
web: bundle exec passenger start -p $PORT --max-pool-size 3
Cheers.