Closed surchs closed 11 months ago
for your interest, I can confirm that at least on Windows, changing the local nodes config to "http://host.docker.internal:8000"
indeed seems to be sufficient (extra_hosts
does not need to be manually added to the docker-compose.yml, it seems).
that said, to make these files interoperable we should definitely add it just in case :)
Dave encountered this today, leading to some head scratching:
Being the good user I am, I follow the docs precisely:
/nodes
endpoint of my f-API lists all the nodes as expectedinternal server error
and I get no results!-> :cry:
The problem is that
localhost
isn't my "host" inside the docker container, so I cannot reach my local n-API. Because we haven't fixed neurobagel/federation-api#38 yet, my local node "failing" leads to the entire f-API failing. Finally, if I run this on bare metal (venv), all is well, because "localhost" makes sense again.btw: the reason this all works in prod is because we don't refer to any of our nodes with
localhost
but instead use their public IPs.To support a truly local deployment, we can use the docker
--add-host
feature: https://docs.docker.com/engine/reference/commandline/run/#add-hostand then change the local node config to
TODO:
docker run
commandlocalhost
being used in any app, and make sure we use it correctly