lucky_cli icon indicating copy to clipboard operation
lucky_cli copied to clipboard

Update default host to 0.0.0.0

Open jkthorne opened this issue 3 years ago • 4 comments

I think in general the default host should be 0.0.0.0. This is a special ip address that will allow binding to all ips. I believe this is default and this configuration was stopping lucky from working in docker.

jkthorne avatar Oct 23 '22 04:10 jkthorne

In this commit it was originally 0.0.0.0, but it was changed to localhost in this commit due to firewall issues on mac. Then changed to 127.0.0.1 in this commit because of browsersync.

So now we've had this in 3 different ways and each time someone has reported an issue with the default... I'm not sure what the "Best" default should be here :man_shrugging: I've personally never had any issues with it being any of these values, but I'd like to get more input on this.

jwoertink avatar Oct 23 '22 20:10 jwoertink

I am working on linux and deploying in docker. deploying a development container is handy and this is breaking.

This does not mean we should change this but I just wanted to add some more context.

jkthorne avatar Oct 24 '22 14:10 jkthorne

Yeah, maybe it's just a matter of more documentation to help someone choose?

jwoertink avatar Oct 24 '22 15:10 jwoertink

Just for reference, Rails uses localhost for development https://github.com/rails/rails/blob/c4194e560d4aaa5a6e6250ed82a1627aa6995d58/railties/lib/rails/commands/server/server_command.rb#L106-L108

See this PR on Rack for a reason why they default to localhost https://github.com/rack/rack/pull/514

The official docker docs for setting up Rails with docker compose show that they bind to 0.0.0.0 https://docs.docker.com/samples/rails/#define-the-project

matthewmcgarvey avatar Oct 24 '22 17:10 matthewmcgarvey