NubeIO / rubix-edge

0 stars 0 forks source link

Get host address from the environment #80

Open RaiBnod opened 1 year ago

RaiBnod commented 1 year ago

Description

Currently, the host is always 0.0.0.0. https://github.com/NubeIO/rubix-edge/blob/f5233d8f092180dc3909de76f444db6dca296e7a/controller/ffproxy.go#L25

If a developer wants to work on FF only, we give a dockerized setup environment for rubix-edge-bios, rubix-assist, rubix-edge. And developers only run the FF on their local machine. For such a scenario, the rubix-edge needs to proxy the service from docker to the host machine. But having that 0.0.0.0 doesn't work as it points to the docker container. So, we need to give host.docker.internal as the host for accessing the FF from docker rubix-edge to the FF.

So having the option to read the host from the environment is a good solution for this.

How can we setup the local dockerized environment: