Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Foreman to Start Rack App Located in Different Directory

I have a Procfile setup that is running a number of processes successfully:

# /Procfile
redis: bundle exec redis-server
sidekiq: bundle exec sidekiq -v -C ./config.yml
forward: forward 4567 mock-api

I need to add one more process - a Sinatra app that lives in a different directory on my machine. If I cd to the directory, I can start it from the Terminal with:

$ rackup -p 4567

And I can start it from a different directory using the Terminal with:

$ sh -c 'cd /Path/to/project/ && exec rackup -p 4567'

But how should I do this using foreman. I have tried adding the following, but it fails silently:

mock-api: sh -c 'cd /Path/to/project/ && exec rackup -p 4567'

Is this even possible? And if so, how?

like image 712
Undistraction Avatar asked Jan 23 '13 15:01

Undistraction


1 Answers

Of all the stupid things ...

It was failing because of the hyphen in the process name.

like image 54
Undistraction Avatar answered Sep 27 '22 21:09

Undistraction