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

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews