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
A Procfile is a mechanism for declaring what commands are run by your application's containers on the Deis platform. It follows the process model. You can use a Procfile to declare various process types, such as multiple types of workers, a singleton process like a clock, or a consumer of the Twitter streaming API.
A Procfile is not technically required to deploy simple apps written in most Heroku-supported languages—the platform automatically detects the language and creates a default web process type to boot the application server.
A Procfile should be a text file, called Procfile , sitting in the root directory of your app. It's the same for Windows or Linux or OS X.
Procfile Naming and Location py . Note that naming the file procfile will not work either, as it is case sensitive.
The shell is the answer. It's as simple as
web: sh -c 'cd ./directory/ && exec appname'
You can chain a set of shell commands together. With the current version of Foreman, you do not need to wrap this in a shell command as in @JohnDoe's answer.
web: cd server_dir && start web_service clk: cd clock_tower && start timers
These would start the necessary processes from their respective folders and track them independently.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With