Skip to content

nelson.cli in other cotainer #3

@antonionardella

Description

@antonionardella

Hello Roman,

I'm again trying to build a docker-compose file.
My setup:

  • docker server IP 10.0.0.x
    • 4 containers:
      • iri
      • nelson.cli with hostname=nelson.cli
      • nelson.mon with hostname=nelson.mon
      • nelson.gui with hostname=nelson.gui

nelson.mon is connecting to nelson.cli:18600 and works fine.
nelson.gui runs on 10.0.0.x:5000 and can ping nelson.cli if I'm inside the cotainer, but is not able to connect to nelson.cli:18600. I've also tried: http://10.0.0.x:5000/nelson.cli/18600, with no success.

From what I understand (please bear with me, I'm not a developer), the nelson.gui is trying to connect to localhost:18600 through my browser, therefore cannot see the server. If i go to http://10.0.0.x:5000/nelson.cli/18600 it's still my browser trying to connect to nelson.cli.
My browser is running on my notebook, while nelson.cli is running on my server and my notebook doesn't know anything about nelson.cli.
This means that the nelson.gui is not talking to nelson.cli, but my notebook is, this may never work for similar setups. Please tell me if I'm wrong with this assumption.

To make it work, I had to give nelson.cli a public hostname like nelsoncli.mydomain.com and modify /src/redux/nelson-api.js to point to this url.
At this point the nelson.gui started working.

Is this by design or am I just hacking around in the blind and there is an easier way?

Thanks,
Antonio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions