Skip to content

Instantly share code, notes, and snippets.

@koenpunt
Forked from fcoury/alias.sh
Created April 8, 2014 14:43
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 koenpunt/10135573 to your computer and use it in GitHub Desktop.
Save koenpunt/10135573 to your computer and use it in GitHub Desktop.
#
# zsh function to start Foreman based on whether or not
# you have multiple Procfiles
#
# we are adopting this schema of having environment
# specific Procfiles:
#
# config/development.proc
# config/stage.proc
# config/production.proc
#
# it searches for a config/ENV.proc file first, and
# if not found, falls back to Procfile
#
function fs {
env=${RAILS_ENV:-development}
if [ -f config/$env.proc ]; then
foreman start -d . -f config/$env.proc
else
if [ -f Procfile ]; then
foreman start
else
echo no Procfile, aborting.
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment