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

Confusing docs on host/port binding #1612

Closed
yuchi opened this issue Apr 24, 2019 · 6 comments
Closed

Confusing docs on host/port binding #1612

yuchi opened this issue Apr 24, 2019 · 6 comments
Labels
bug Confirmed bug documentation Improvements or additions to documentation

Comments

@yuchi
Copy link
Contributor

yuchi commented Apr 24, 2019

⚠️ There’s no «Documentation Problem» issue template, so I built my own. Feel free to point me to the correct templates/channels.

📝 Documentation Problem

In the Getting Started section of the documentation there’s a “Note” section about host binding (source). That section concludes with (emphasis mine):

[…] When deploying to a Docker, or other type of, container this would be the easiest method for exposing the application.

Since in the section there are 2 different approaches exposed (127.0.0.1 vs 0.0.0.0) the term this doesn’t help the reader understand which one should be used in the context of containers.

Solution Proposal

I’m no network/docker expert, so please forgive me if I inferred incorrectly (which would just add value to this issue report!) but I suggest to explicitly give the reader some directions:

When deploying to a Docker, or other type of, container using :: (or 0.0.0.0 for IPv4 only) would be the easiest method for exposing the application.

@delvedor
Copy link
Member

Hello!
There is not the "Documentation Problem" issue template, because we think that a problem with the doc is a bug! 😉

I'm pinging @jsumners since he wrote that part of the doc and raised the issue at the beginning.

Related: #667 #728

@delvedor delvedor added bug Confirmed bug documentation Improvements or additions to documentation labels Apr 24, 2019
@jsumners
Copy link
Member

The solution may be as simple as making the sentence part of the previous paragraph.

@yuchi
Copy link
Contributor Author

yuchi commented Apr 24, 2019

@delvedor good to know! I’m just happy to see that my concerns are shared. (BTW we met in Rome few weeks ago — I told you I would look at fastify!)

@jsumners that same paragraphs covers both ::1 and :: so if (1) you are actually saying that :: is preferred in containers and (2) you don’t make it a different sentence altogether and separate the parts by, say, an em dash “—“, then yes it does make a lot of sense.

@jsumners
Copy link
Member

Submit a PR with your proposed change.

@yuchi
Copy link
Contributor Author

yuchi commented Apr 24, 2019

Will gladly do so, can you please confirm that 0.0.0.0 and :: are the preferred options on containers? I really know nothing of containers and networking, I just happen to know how to bind ports and that’s it…

@mcollina
Copy link
Member

Yes! 0.0.0.0 is actually needed in containerized environments.

yuchi added a commit to yuchi/fastify that referenced this issue Apr 26, 2019
The previous version of the documentation didn’t make it clear that
the correct approach in containerized environments is to bind to `::`
or `0.0.0.0`.

We now explictly suggest the correct approach.

Fixes fastify#1612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants