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 env variable support for port options #5221

Merged
merged 3 commits into from
May 16, 2020

Conversation

kevin-bates
Copy link
Member

In order to better support use cases relating to containerized environments,
this change adds environment variable support for the --port option. Since
anyone setting a specific port probably doesn't want port retry logic enabled,
the --port-retries option has also been backed by an env.

Option --port will be backed by env JUPYTER_PORT and still defaults to 8888.
Option --port-retries will be backed by env JUPYTER_PORT_RETRIES and still
defaults to 50.

The CLI options will override those set via the environment, but environment
values override those set via configuration files.

Closes #5212

In order to better support use cases relating to containerized environments,
this change adds environment variable support for the `--port` option.  Since
anyone setting a specific port probably doesn't want port retry logic enabled,
the `--port-retries` option has also been backed by an env.

Option `--port` will be backed by env `JUPYTER_PORT` and still defaults to `8888`.
Option `--port-retries` will be backed by env `JUPYTER_PORT_RETRIES` and still
defaults to `50`.

The CLI options will override those set via the envrionment, but environment
values override those set via configuration files.

Closes jupyter#5212
@kevin-bates kevin-bates mentioned this pull request May 5, 2020
24 tasks
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! Needs a rebase.

@blink1073 blink1073 added this to the 6.1 milestone May 15, 2020
@kevin-bates
Copy link
Member Author

kevin-bates commented May 15, 2020

Thanks for reviewing this Steve. Updated with master (and again - sorry, the first contained some remnants from the merge).

@blink1073 blink1073 merged commit d2d50f1 into jupyter:master May 16, 2020
@kevin-bates kevin-bates deleted the add-env-for-port-options branch May 26, 2020 21:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use environment variable to set port to run on
2 participants