Fork me on GitHub

Heroku

Deploying to Heroku is easy!


Sign up for Heroku

OK, you're on your own here. Just go to www.heroku.com and sign up.

Install the Heroku CLI

Head over to the Heroku Dev Center and install the CLI.

Add a Procfile

So the only change needed to your app is to add a Procfile to the root directory. For caboose it should look like this:

web: caboose server
    

Be sure that your app is setup for git

If your caboose app isn't yet set up to use git, initialize it.

$ git init
$ git add .
$ git commit -m 'initial commit'
    

You can either add it to github for safe keeping, or just keep it on your local system.

Create a new Heroku stack

In your caboose application directory, let's create a new Cedar stack from a custom buildpack. I've found a github project that keeps up with the latest Node version at https://github.com/liquid/heroku-buildpack-nodejs, so let's use that buildpack.

$ heroku create --stack cedar --buildpack https://github.com/liquid/heroku-buildpack-nodejs.git
    

Set the environment to production

Now that you have a new instance, you need to change the environment. This is done through setting the CABOOSE_ENV environment variable on your instance.

$ heroku config:set CABOOSE_ENV=production
    

Push to Heroku

You're almost there. Now you need to git push it to Heroku.

$ git push heroku master
    

All done!

Your application should be up and running on Heroku now. You can check on it with heroku ps and view the logs with heroku logs. Alternatively, you can use the caboose console to check out the configuration and run code within your app's environment.

$ heroku run caboose console