-
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.yml
are properly set then run:bundle exec rake heroku:config
Copy, 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:wayne
Open the addon by running
heroku addon:open newrelic
Click on the top-right dropdown menu and select "Account Settings". On your account page, copy your License key. Open
config/newrelic.yml
to setlicense_key
variable value to your license. -
Addon: Flying Sphinx ($55)
heroku addons:create flying_sphinx:ceramic
Ceramic plan is needed for Delta indexes. If you can manage without Delta Indexing, smaller plan is also ok
-
Addon: MySQL
heroku addon:create cleardb:ignite
Now get your database url by running
heroku config:get CLEARDB_DATABASE_URL
Copy 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:standard
Open the scheduler
heroku addon:open scheduler
And 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
For sphinx this is what worked for me:
1 - Download your certificates (3 files) from ClearDB dashboard
2 - Remove password form the key file as follows:
$ openssl rsa -in cleardb_id-key.pem -out cleardb_id-key-no-password.pem
3 - Remove the -no-password from the new file and add the new file plus the other two to your repo and configure them under the prod section of your thinking_sphinx.yml
4 - deploy your changes and run
heroku run bundle exec flying-sphinx configure
heroku run bundle exec flying-sphinx rebuild
heroku run bundle exec flying-sphinx index
heroku run bundle exec flying-sphinx start
5 - Try doing a search and you should not see the red error anymore
This is a good Q&A: http://support.flying-sphinx.com/discussions/problems/2037-no-erros-but-search-is-not-working-on-heroku