Here's the complete question:
https://stackoverflow.com/questions/75165243/why-i-cant-connect-two-containers-between-each-other-in-railway-app
My project id: a1194252-3cbd-4f4e-b633-abd9e9f6db61
17 messages · Page 1 of 1 (latest)
Here's the complete question:
https://stackoverflow.com/questions/75165243/why-i-cant-connect-two-containers-between-each-other-in-railway-app
My project id: a1194252-3cbd-4f4e-b633-abd9e9f6db61
Project ID: a1194252-3cbd-4f4e-b633-abd9e9f6db61
You might find these helpful:
Unfortunately, this is not implemented yet. I believe that it is on the roadmap, however: https://railway.canny.io/feature-requests/p/internal-networking
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.
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.
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
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)?
Just use python server.py & node socketServer.js in your start command to run them both at once.
private networking is in the works!
Hope to see it as soon as possible! Cheers!
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.
Private networking is ready?
not yet, we will announce when its released!