Skip to content

Autodetection returns internal IP when running in Docker container #105

@sejnub

Description

@sejnub

I am in the process of building a Docker container for the noflo-nodejs-runtime (First version is for the raspberry pi. Other versions will be added if I succeed). I will hone this container and the documentation so that it will be easily usable. The Dockerfile can be found under https://github.com/sejnub/docker-noflo-runtime-js/blob/master/Dockerfile

Here comes the problem(s): After node is configured with

node node_modules/.bin/noflo-nodejs-init --user <id> --host <public runtime ip> --port 3569 --label "noflo-nodejs on Raspi"

it shows the following:

Stored the following configuration to /flowhub.json

id: "<36 digit id>"
user: "<another 36 digit id>"
host: "<public ip of the runtime host>"
port: 3569
label: "Local NoFlo Test"
secret: "<secret>"
permissions: {
  "<same secret again>": [
    "protocol:component",
    "protocol:runtime",
    "protocol:graph",
    "protocol:network",
    "component:getsource",
    "component:setsource"
  ]
}

When I then start the runtime with

node node_modules/.bin/noflo-nodejs --capture-output=false

the runtime is registered and visible in the browser on the app.flowhub.io after logging in.
But the runtime is shown with "ws://172.17.0.4:3569" which is the local ip address of the container the runtime is hosted in.
So when I click the runtime it of cause can not connect.

I found out that I have to set the host again when I start the runtime with

node node_modules/.bin/noflo-nodejs --host

Why is this?
I did set the host with "noflo-nodejs-init --host" so why set it again with "noflo-nodejs --host "?
If I don't set it again here the runtime does register at app.flowhub.io but it is registered
with the local ip of the container 172.17,... and so the flowhub-app can't reach the runtime.

First question: Why do I have to set the host two times? Is this intended behaviuor

But even if I set it here again I can't find a way to use this runtime in a github synced project. The registered runtime is not shown when I try to use the "Select runtime" button.

Second question: How can I use my registered runtime inside a github project? (Or is this question noflo-ui related and I should post it there?)

When I register the runtime manually via "new runtime register / add manually" it works, but only one time. When I go back to "home" (app.flowhub.io) the manually registered runtime is shown for only half a second, then it's gone.

Third question: Why is the manually registered runtime only usable a single time? (Or is this question noflo-ui related and I should post it there?)

I am sorry, if this is the wrong place to ask this questions. I could not find a better one.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions