Opening up a host port on Balena container


Ive been trying to implement Redis Simple Message Queue( on my Banlena project, Ive added
network_mode: host to my docker compose

But when I try and run a function like this.rmsq.listQueues(callback
It just hangs, I think its to do with the internal network, Ive instantiated the class as follows:
this.rsmq = new RedisSMQ({ host: “”, port: 6379, ns: “rsmq” });

If i try ping
I get a “Name or service not known”
Do you know how I can open up this port to be used?

I also tried setting the Port on docker-compose:
- “6379:6379”

Hi @PatrickEntabeni, at first thought, it seems like you need to expose that port by adding EXPOSE 6379 line to your dockerfile. You could read about EXPOSE directive and more in this masterclass:

We also have 2 example projects using Redis in a Balena project:

Hope these help. Let us know how it goes.

1 Like

Thanks @gelbal

Ill give that a try