R
Railway•13mo ago
foobarmitzfah

How can I set a custom port for my internal application?

I have a public app, and an internal/private app, how can I guarantee the port on my internal app is set to something specific?
Solution:
ah good question, it certainly would be hard to make internal requests to other services in the private network when railway assigns random port variables to each service, so in this case you can set a fixed PORT variable in the service variables!
Jump to solution
4 Replies
Percy
Percy•13mo ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Solution
Brody
Brody•13mo ago
ah good question, it certainly would be hard to make internal requests to other services in the private network when railway assigns random port variables to each service, so in this case you can set a fixed PORT variable in the service variables!
foobarmitzfah
foobarmitzfah•13mo ago
Works like a charm, thanks!
Brody
Brody•13mo ago
no problem! 🙂