Skip to content

Using Bender on Heroku

Mike Heijmans edited this page Feb 23, 2015 · 3 revisions

Bender is 100% Heroku compatible!

All base configuration can be done via Environment variables.

Instead of using Bender::Config.configure you can just set the ENV equivalents to configure Bender.

This is way more secure btw (you're not putting the bot's name or default rooms in your source code for people to find)

Setup the required environment variables

These are the minimum variables you should setup before you get started on Heroku

These setup Bender

heroku config:set IRC_NICKNAME=my_bender_bot
heroku config:set BENDER_ENV=production
heroku config:set
heroku config:set IRC_ROOMS=#my-awesome-room,#my-awesome-room2
heroku config:set HTTP_SHARED_SECRET=a_secret_unique_string

These prevent problems and bloat on Heroku:

heroku config:set BENDER_ENV=production
heroku config:set BUNDLE_WITHOUT=development:standalone

Deploy to heroku

git push heroku master

##List of Available Environment Variables:

Config Variable Environment Equivalent Default
irc_log_file IRC_LOG_FILE STDOUT
irc_log_rotation IRC_LOG_ROTATION 'weekly'
irc_log_level IRC_LOG_LEVEL :INFO
username IRC_USERNAME 'bender'
fullname IRC_FULLNAME 'Bender'
nickname IRC_NICKNAME 'bender'
irc_server IRC_SERVER 'localhost'
irc_port IRC_PORT 6667
irc_token IRC_TOKEN nil
nickserv_password NICKSERV_PASSWORD nil
disable_http DISABLE_HTTP false
http_log_rotation HTTP_LOG_ROTATION 'weekly'
http_log_level HTTP_LOG_LEVEL :INFO
http_port PORT 9091
http_max_clients HTTP_MAX_CLIENTS 4
http_listen_address HTTP_MAX_CLIENTS ''
http_auth_token HTTP_AUTH_TOKEN nil
pid_file PID_FILE './'
irc_rooms IRC_ROOMS []
irc_accept_invites IRC_ACCEPT_INVITES true
irc_use_ssl IRC_USE_SSL false
http_auth_token HTTP_AUTH_TOKEN nil
Clone this wiki locally
You can’t perform that action at this time.