#Lavalink and Bot in Docker

1 messages · Page 1 of 1 (latest)

prime pier
#

Hi guys,

Running both Lavalink and Discord bot in the same Docker host. They are connected each other in the same network, as

Lavalink: 172.16.0.5
Bot: 172.16.0.6

Lavalink is running with default config, only password is set with env variables

Attached to console and both containers run good and they can see each other (ping between them)

However, bot gets ECONNREFUSED trying to connect to Lavalink using 172.16.0.5:2333

I published a port to the host (2600 maps to 2333) and tried to use host network, doesnt work too

The containers bridge network (172.16.0.0/16) should work, any clue why the ECONNREFUSED?

#

I also tried specifying server address to 172.16.0.5 manually with env (although 0.0.0.0 should work), but no luck

north wadi
#

do you have a docker compose file?

prime pier
#

No, I’m working using Portainer

north wadi
#

can you psot that configuration then?

#

also usually you want to refer to containers via hostname

#

which would default to the serivce name

#

I think the main issue here is that you didn't specify the port and that makes it default to 8080

prime pier
#

Where should I specify the port? I thought the default was 2333. Should I specify it with env variables then?

north wadi
#

Should I specify it with env variables then?
yes

prime pier
#

Gonna try!

#

thank you!