Procfile start processes in their own working directory

JohnDoe picture JohnDoe · Nov 8, 2012 · Viewed 11.2k times · Source

I have this simple Procfile

web: myapp

myapp is in the path, but the processes home directory should be ./directory/. How can I specify in the Procfile where the process is to be started?

https://github.com/ddollar/foreman/pull/101 doesn't help because it assumes, that this working directory should be the same for every process specified by the Procfile

Answer

JohnDoe picture JohnDoe · Dec 9, 2012

The shell is the answer. It's as simple as

web: sh -c 'cd ./directory/ && exec appname'