Help Regarding Dynamic Ports
cipher-x-sudo
PROOP

3 months ago

Hey! everyone

42 Replies

cipher-x-sudo
PROOP

3 months ago

what we want is

we have a tool that create a separate container for each person and each container has a unique port and data to each other

i just want that we host that thing on here railway


cipher-x-sudo
PROOP

3 months ago

like there be an option to unblock ports


You can use the public API to create new URLs mapped to different ports.


mutation customDomainCreate query


cipher-x-sudo
PROOP

3 months ago

can u plz explain it a bit more or refer me to docs page

also i mentioned that each conatiner has a differnt port

like that conatiner can be having a binary being runned so we have to do nc to use

for example nc ip/domain port


I’m not too sure what you’re trying to ask here.
Each container doesn’t have a different port. You choose what port to expose with each container (service).


The only port that’s “blocked” are SMTP ports. SMTP is only available for Pro plans.


cipher-x-sudo
PROOP

3 months ago

buddy we have an application that create a separte container


cipher-x-sudo
PROOP

3 months ago

we dont have concern with the SMTP


I’m only elaborating.


cipher-x-sudo
PROOP

3 months ago

Port Mapping Example
Scenario: Application inside container listens on port 12312

System finds available port: 45678
Docker creates mapping: 0.0.0.0:45678 -> container:12312
System stores: port = 45678
Client connects to: hostname:45678
Docker forwards to: container:12312


cipher-x-sudo
PROOP

3 months ago

1449784521225404400


cipher-x-sudo
PROOP

3 months ago

1449784594051235800


You can’t create containers dynamically within an application on Railway.


You can, however, use the public API to create different services for each user.



cipher-x-sudo
PROOP

3 months ago

each service = new conatiner?


cipher-x-sudo
PROOP

3 months ago

and can we timeout the service? or liek what are teh possibilities in our scenario


Define timeout.


You can put it that way, yes.


cipher-x-sudo
PROOP

3 months ago

timeout in the service or what level the timeout must be


cipher-x-sudo
PROOP

3 months ago

what other ways can be our problem be solved



cipher-x-sudo
PROOP

3 months ago

sorry for taking that much of the time we are actually migrating to railway and we are still figuring out things on railway


What does your “timeout” do?



cipher-x-sudo
PROOP

3 months ago

timeout will simply delte that continer


cipher-x-sudo
PROOP

3 months ago

just as we are doing currently we create conatiner and aftre timeout that conatiner vanishes


You can also delete services through the public API.


cipher-x-sudo
PROOP

3 months ago

can i dm you ??


You can manage services and deployments and its configuration (replicas, public URLs, deletion/creation/shutdown) through the GraphQL endpoint.


I would prefer keeping things here.


cipher-x-sudo
PROOP

3 months ago

yup sure nw


Most of what you need can be found in here. You can play around with the various queries and mutations through the playground.


cipher-x-sudo
PROOP

3 months ago

one thing i want to clarify is that the nc thing

will railway allow that service to do netcut?


I’m not sure. However, there shouldn’t be a reason for you to be using netcat. You can expose most ports through the public API.


You also will not need to check which ports are available and which aren’t. Each service is its own little “box.”


cipher-x-sudo
PROOP

3 months ago

there is a reason sir

what we want that is program/binary (like a compiled c++ code) to be accessed via nc to the user


cipher-x-sudo
PROOP

3 months ago

like terminal access to the the code being runned in the cloud there will be no gui to that just the conatiner will have the compiled code to be runned


I’m pretty sure it should work in your case. You’ll just need to set up a TCP proxy within the service so netcat will be able to connect.


Railway will automatically generate a URL for that proxy.


cipher-x-sudo
PROOP

3 months ago

thanks for the info if i need more info then i would ask again thanks for time


Loading...