Skip to content

Instantly share code, notes, and snippets.

@BukhariH
Forked from zobar/gist:1499822
Last active March 11, 2019 18:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BukhariH/9125653 to your computer and use it in GitHub Desktop.
Save BukhariH/9125653 to your computer and use it in GitHub Desktop.
How to run a bot on Heroku
  1. Add Heroku to your Gemfile and bundle install.
  2. Create your Heroku app. This will only work with their (currently-beta) 'cedar' stack, so you have to heroku create --stack=cedar.
  3. Create a Procfile for your bot. This tells Heroku how to run your worker. In our case, the bot is bot.rb, so the only line in the Procfile is cinch: bundle exec ./bot.rb
  4. Commit and push to Heroku.
  5. You do not want a Web worker running, so heroku scale web=0 cinch=1. This also sets up your deployments to restart the bot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment