Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BP_PROCFILE_DEFAULT_PROCESS environment variable #226

Merged

Conversation

jericop
Copy link
Contributor

@jericop jericop commented Apr 2, 2024

Summary

This change adds support to allow users to specify a default process by setting the BP_PROCFILE_DEFAULT_PROCESS environment variable. When environment variable BP_PROCFILE_DEFAULT_PROCESS is set to a non-empty value, the value will be set as the web 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

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@jericop jericop requested a review from a team as a code owner April 2, 2024 23:51
@dmikusa dmikusa added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Apr 4, 2024
@dmikusa dmikusa merged commit a53b61f into paketo-buildpacks:main Apr 4, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants