Open johnshaughnessy opened 1 year ago
This is a design smell. hubs.local
and hubs-proxy.local
are external host names. It tells us that our software is attempting to communicate across the WAN instead of the LAN. Let’s figure out why and determine whether or not it should be that way before hacking the hosts file.
It’s also on my todo list to make hubs.local
and hubs-proxy.local
a piece of configuration in Reticulum. Unfortunately they are hard-coded throughout at present.
For local development, we have been mapping
hubs.local
tolocalhost
via entries in the hostfile (/etc/hosts
). With this docker setup, the services are running in separate containers and thus should not map tolocalhost
for cross-service traffic.Add
extra_hosts
so thathubs.local
andhubs-proxy.local
resolve to thehost-gateway
and containers can reach one another. It seems thathost.docker.internal
also only works for me (on linux) if it is included as anextra_host
.I don't know if this is the correct solution. I was inspired by this stackoverflow answer https://stackoverflow.com/a/70725882 , which comes with a warning and recommendation to define a custom
network
definition that will guarantee a specific gateway address.Incidentally, @keianhzo 's open PR defines a
subnet
for thehubs_network
: https://github.com/mozilla/hubs-compose/pull/16/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3R166-R170Following the advice linked above, we would add a
gateway:
to the config (and perhaps anip_range
, if necessary).