developerasun / myCodeBox-web

Open source code box for web developers.
Apache License 2.0
5 stars 0 forks source link

[RESEARCH] Cloud/Heroku: Procfile #249

Open developerasun opened 2 years ago

developerasun commented 2 years ago

topic : understanding Procfile in Heroku project

read this

Procfile

Heroku apps include a Procfile that specifies the commands that are executed by the app on startup.

Procfile convention

The Procfile is always a simple text file that is named Procfile without a file extension. For example, Procfile.txt is not valid. The Procfile must live in your app’s root directory. It does not function if placed anywhere else.

Procfile format

A Procfile declares its process types on individual lines, each with the following format:

<process type>: <command>

process type is an alphanumeric name for your command, such as web, worker, urgentworker, clock, and so on. command indicates the command that every dyno of the process type should execute on startup, such as rake jobs:work.

The web process type

A Heroku app’s web process type is special: it’s the only process type that can receive external HTTP traffic from Heroku’s routers. If your app includes a web server, you should declare it as your app’s web process.

For example, the Procfile for a Rails web app might include the following process type:

web: bundle exec rails server -p $PORT

reference