#Why I can't connect two containers between each other?

17 messages · Page 1 of 1 (latest)

devout charm
wheat plazaBOT
#

Project ID: a1194252-3cbd-4f4e-b633-abd9e9f6db61

valid vector
#

However, if you expose the services to the internet, you should be able to communicate between them that way. It's not ideal security-wise, though.

#

Some people have also had success using Tailscale to connect their services.

devout charm
#

Wow, thanks, however it sounds so complicated.
I just wanted to connect both services with each other, but I see it isn't so easy as I though.
I though that all the containers in a project was connected by a docker network. With http requests I can use the public domains that railway offers but with sockets I need host and port, I cannot use domain, it is a shame. Thanks.

valid vector
#

You could probably run two processes in the same service using normal shell &, if they're running on different ports, though.

#

And then connect through localhost

devout charm
#

I will try it, thanks!

#

Maybe, in my service called back (the python server) in my Dockerfile before start the server, run the command to execute the nodejs file (socket connector)?

valid vector
#

Just use python server.py & node socketServer.js in your start command to run them both at once.

fair mortar
#

private networking is in the works!

devout charm
#

Hope to see it as soon as possible! Cheers!

wind sundial
# fair mortar private networking is in the works!

That's what I too need. I have to route all my api requests through nginx reverse proxy to my spring boot app which should be private. Only nginx will be exposed to public. Not sure if that's possible now.

devout charm
fair mortar
#

not yet, we will announce when its released!