Skip to content

Instantly share code, notes, and snippets.

@nlindley
Created October 17, 2014 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nlindley/a63854400bb15d2b5d85 to your computer and use it in GitHub Desktop.
Save nlindley/a63854400bb15d2b5d85 to your computer and use it in GitHub Desktop.

Foreman Setup

Install Homebrew

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install rbenv and ruby-build

$ brew install rbenv ruby-build

Install a version of Ruby

$ rbenv install --list # to see available versions
$ rbenv install 2.1.3 # to install the specific version
$ rbenv global 2.1.3 # set as your default version

Install Foreman

gem install foreman
rbenv rehash

Set Up Project

In the project directory create a Procfile with the processes you would like to run. For example:

web: node index.js
worker: node doBackgroundStuff.js

If you have environment variables, put them in a .env.

NODE_ENV=development
API_KEY=98r109jdfowipuf3489uf

Start Things

$ foreman start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment