What I am trying to do is to run the Erlang Observer App locally and then connect to a remote Docker container that is running my Elixir/Phoenix app in production.
The problem I am having is not being able to connect.
From my research it seems that I need to know the IP address of the Docker image before starting the Phoenix server, so that I can start it like so:
iex --name [email protected] -S mix phoenix.server
I'm not sure whether a cookie is needed, so I've also tried
iex --name [email protected] --cookie random_cookie -S mix phoenix.server
I've tried using a hostname instead of an IP address, that did not seem to work.
Once I have that running then I expect to run Observer like this
erl -name [email protected] -setcookie random_cookie -run observer
Or, with IEx
iex --name [email protected] --cookie random_cookie
iex> :observer.start()
Can I start a Phoenix server without needing to know the IP address and still be able to remotely connect with Observer?
I can figure out what the IP address will be of the docker image during building it up with this shell command
ip addr | grep -Eo 'inet (.*) scope global' | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
But can't figure out how to put this in the command to start the Phoenix server.
I know there is a possible solution with starting up docker images with static IP address, but I cannot set static IP addresses with my setup.
Any help is appreciated.