Use Foreman to launch a Rack application located in a different directory.

I have a Procfile program that works successfully with several processes:

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

I need to add another process - the Sinatra application, which lives in a different directory on my machine. If I connected to the directory, I can start it from the terminal using:

 $ rackup -p 4567 

And I can run it from another directory using the terminal with:

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

But how can I do this using the wizard. I tried to add the following, but it fails:

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

Is it possible? And if so, how?

+6
source share
1 answer

Of all the stupid things ...

This happened due to a hyphen in the process name.

+5
source

All Articles