FlowFuse / docker-compose

Docker Compose file to run FlowForge
Apache License 2.0
15 stars 19 forks source link

Unable to access nodered created using project #60

Closed akashtalole closed 1 year ago

akashtalole commented 1 year ago

Current Behavior

While acessing nodered getting below error Error: getaddrinfo EAI_AGAIN forge.example.com nr-err

Expected Behavior

nodered should be accessible

Steps To Reproduce

No response

Environment

hardillb commented 1 year ago

FlowForge on Docker uses hostname based routing. To make this work you need to provide a DNS domain in the etc/flowforge.yml file and configure your DNS to resolve that domain to the machine hosting Docker.

This is mentioned in the documentation here

DNS

The orchestration uses an instance of Nginx to route requests to each Node-RED Project. To do this it needs each instance to have a unique hostname, to generate this the project name is prepended to a supplied domain.

To make this work you will need to configure a DNS server to map a wildcard domain entry to the IP address of the host running Docker. e.g *.example.com.

The FlowForge Application will be hosted on http://forge.example.com

Note When testing locally you can add entries for each project to your /etc/hosts file but you must use the external IP address of the host machine, not the loopback address (127.0.0.1).

And in the Configuring FlowForge section here

Configuring FlowForge

Configuration details are stored in the etc/flowforge.yml file which is mapped into the flowforge/forge-docker container. You will need to edit this file to update the domain and base_url entries to match the DNS settings. Please note that once set, the domain and base_url values should not be changed as these values are used as part of the configuration stored in the database of each project. The ability to migrate domains is on the feature backlog.

You also need to update the VIRTUAL_HOST entry in the docker-compose.yml file to use the same domain as in the etc/flowforge.yml file.

For more details on the options available, see the configuration guide.

Both of these sections are also in the README.md for the project.

Documentation about how to setup DNS for local testing is coming soon (but will does not cover Windows as I can't find a suitable DNS server to run on Windows).

akashtalole commented 1 year ago

I have host file entries in windows. It was working before. Today i updated Docker desktop. Will check it once after rebooting system.

akashtalole commented 1 year ago

hostname resoultion is working from my system cmd but it is not resolving from conatiner.

hardillb commented 1 year ago

Yes, this is expected, because the containers can't see your hosts file

akashtalole commented 1 year ago

I have stopped nodered container and copied docker run command. Added --add-host forge.example.com:<IP> in that command and created new container manually. Now its acessible