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

Using variable named PORT creates issues #4

Open
inadarei opened this issue Jul 14, 2017 · 1 comment
Open

Using variable named PORT creates issues #4

inadarei opened this issue Jul 14, 2017 · 1 comment

Comments

@inadarei
Copy link

inadarei commented Jul 14, 2017

It's a widely established standard for services (e.g. microservices) to consult with the PORT environmental variable on which port to bind to.

The fact that wait-for.sh uses a variable called "PORT" for internal needs gets in the way of this practice and can lead to fatal errors. Since the name of the local variable used for implementing wait-for.sh doesn't really matter, it should be renamed for something less common, e.g. WAIT_PORT

The generic names for HOST and TIMEOUT are less of a problem, possibly but while at it - probably a good idea to namespace them as well.

@NxP4Code
Copy link

I had this issue with my node js application. It was using mongo db port to start with and I spent so much time trying to understand why my app is using mongo port to start service. I realized it was due to wait-for script. I change PORT variable name in wait-for script to CHECK_PORT and all worked fine.

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

No branches or pull requests

2 participants