Added pub_sub and libcuster with gossip strategy in both client and server and the talk perfectly in my localhost.
Now I have moved on to have my Client in a docker image to start it up with docker-compose but I can’t make it connect to my localhost server anymore, my docker/docker-compose knowledge is limited so this might be very bad typing but any tips why this doesn’t work?
Dockerfile
FROM elixir:1.14.1
# Create app directory and copy the Elixir projects into it.
RUN mkdir /app
COPY . /app
WORKDIR /app
# Install Hex package manager.
# By using `--force`, we don’t need to type “Y” to confirm the installation.
RUN mix local.hex --force
# Compile the project.
RUN mix do compile
RUN mix deps.get
My aim is to have multiple person-services started in my docker-compose and just be able to run docker-compose up to start and get them to connect to the server. But for now, I would be happy just to get one to start, atm everything runs but nothing happens isn’t even sure that the node is started.
I wonder if you’re missing a piece in your topology to assign your docker containers to a shared network. I’ve always had issues with separate containers talking to each other unless I explicitly set a network.
In my case, I wasn’t using docker-compose but starting docker manually.