Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Installing on Heroku

Tim Malone edited this page May 31, 2017 · 15 revisions

These instructions are currently under construction and should be considered for development use only.

First up, click this button!

Deploy to Heroku

Sign in to Heroku if you need to, and follow the instructions on screen.

You then need to follow the main instructions for setting up the Slack side of things in the README.

When you get to the environment variables step, from your Heroku app screen, navigate to the Settings tab, and click Reveal Config Vars. You'll need to add your values for at least the 6 required config variables here, which you can find at the top of .env.example.

  • Your inbound URL will look something like https://your-app-name.herokuapp.com/
  • You can add any of the optional variables that you desire as well

When you get to setting up cron, probably the simplest method of doing this with Heroku is to use an external service such as cron-job.org. Create an account there, and set up a cron for every minute to call your Heroku server like this:

https://your-app-name.herokuapp.com/cron.php?token=XXXXXXXXXXXXXXXXXXXX

  • In the URL above, you'll need to replace the token with the value of the SLACKEMON_CRON_TOKEN environment variable that you set up in the last step. This prevents people from stumbling across and invoking the cron script unauthorised.
  • Note that setting up this cron job will mean that a free dyno will always be active, even when you or others on your Slack organisation aren't using Slackémon. There are enough hours on a verified free plan to keep Slackémon running 24/7, as long as you don't have any other apps using up those hours. You can limit your cron to only run during waking hours if you want to curb this a little, however with the present version of Slackémon this can cause issues if people are battling during this time. A future version of Slackémon will make it easier to turn the app off completely during certain hours.

If you've followed all these steps, including the normal Slack setup steps in the README, it's time to start playing! You should now be able to run /slackemon anywhere in your Slack team to start the quick user onboarding process 👍

PLEASE NOTE: These setup instructions are still under construction. In particular, instructions and the backend method for a persistent data store have not yet been completed. This means that Heroku deployments will currently 'reset' at least once a day, in line with Heroku's normal processes. So please consider these instructions a work-in-progress, and for development use only at this stage.

  • TODO: We should automate some of environment variables setup.
  • TODO: We need to consider automating set up of the Heroku Scheduler - although this will use double the dyno hours, so it might not be the best option.
  • TODO: We need to add a method for using a data store on Heroku (for caching of API data + storing local player data).
  • TODO: We should also add optional steps for setting up automatic updates (redeployments) from GitHub every time a new version of Slackémon is released.

Follow Slackémon on Twitter!
Latest Release
Join us on Slack!

Deploy to Heroku

Clone this wiki locally