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

Support CEREBRO_PORT environment variable #5

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

matthew-gill
Copy link
Contributor

As per my issue here, I'd like to be able to change the cerebro port at runtime.

This would allow the use of cerebro within a Kubernetes cluster without port clashes. This is quite common for docker containers.

I've made some changes to the Dockerfile to swap to using an entrypoint.sh file which reads from the environment variable CEREBRO_PORT - this will default to 9000 if not specified (so it remains compatible).

I don't see any compatibility breakages here, my slight concern is dropping the EXPOSE command in the Dockerfile - but as this is optional (and the existing instructions get the user to specify this manually), I believe it's superfluous.

@moliware
Copy link
Collaborator

Hi!

Thanks for contributing! Now I fully understand #4

The changes looks good but I feel that the right thing to do is to start using CEREBRO_PORT in the configuration of the main project (https://github.com/lmenezes/cerebro). My plan is to make a release tomorrow, so I will add the possibility of configuring port via env var (actually newer version of play already have onePLAY_HTTP_PORT).

Once I do this I'll edit a bit your PR and merge.

Thanks again!

@matthew-gill
Copy link
Contributor Author

That's great news! Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants