Add support for BP_PROCFILE_DEFAULT_PROCESS environment variable #226
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This change adds support to allow users to specify a default process by setting the
BP_PROCFILE_DEFAULT_PROCESS
environment variable. When environment variableBP_PROCFILE_DEFAULT_PROCESS
is set to a non-empty value, the value will be set as theweb
process type, which is the default process.Procfile
file and binding take precedence over the environment variable, and a message will printed if the environment variable and either file type is also used.Use Cases
There are times when a user needs to specify a default process for an application, but they do not necessarily want to add a Procfile to their application source code. The paketo python buildpack is a good example where the user needs to specify a Procfile, otherwise the default process will be the python shell (REPL).
Since most users will likely only need to specify one process type, the default process, it should be configurable through an environment variable.
Checklist