huuro

huuro

Hello guys,
I have my app built up, and now I’m wondering, how can I run two instances (on two servers) of the distillery release and connect them into Elixir node-cluster.

I set up an application as this guy here → Cluster Phoenix with Docker
But, when I run HOST=172.31.56.165 PORT_SSL=4000 REPLACE_OS_VARS=true NODE_NAME=prod01@217.0.0.1 _build/prod/rel/myapp_phoenix/bin/myapp_phoenix foreground For first node and then
HOST=172.31.56.165 PORT_SSL=4000 REPLACE_OS_VARS=true NODE_NAME=prod02@127.0.0.1 _build/prod/rel/myapp_phoenix/bin/myapp_phoenix foreground for the second

IDK how to run Node.connect (or whatever, IDK even how to run the console, which will be running in same “context” as the apps)

And secondly, as far as I understand if I have those apps running like this, they are a standalone instances. In other words, they are not seeing each other in EVM, therefore I can’t for example broadcast in Phoenix channel from one to other(s). → so I need somehow to connect them.

I’m trying to do some POC on localhost, but then I want to run apps separately on docker.

I also tried an approach from Cris’s article here Running Elixir and Phoenix projects on a cluster of nodes - DockYard

to do something like elixir --name n1@127.0.0.1:4001 --erl "-config sys.config" PORT=4001 -S /path/to/release

But it’s not working (obviously), either.

Can anyone please, help me??
Thanks in advance.

Showing Posts 1 to 1

huuro

huuro OP

Ok I guess that I’ve been wrong. If I try to do iex(n1@127.0.0.1)1> :net_adm.ping(String.to_atom("n2@127.0.0.1")) I’m getting :pong response. So they are seeing each other?

Now I thing I was dealing with problem which wasn’t there :smiley:

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews