2 months ago
Hey everyone ^^
When I don't provide a port, railway chooses one for me. In my case 8080 but that's not important.
I'd love to use this port in my reverse proxy setup but it does not seem to be available as a service env to reference? Am I missing something?
Or can I at least trust that I'll stay 8080 in future deployments?
0 Replies
2 months ago
You can specify a PORT variable to overwrite it or just set PORT to 8080 explicitly.
I get that, I just tried to keep my variables as concise as possible. So if the port is already provided I would not really need to override it. It's just a bummer that I can't reference it ^^
2 months ago
That's why I suggested to just set it explicitly, this way you can just reference it.
Yes, that's how it's set up now. It's just not what the initial question was about. It was explicitly to try to not need to set it explicitly 😇
2 months ago
I believe that you can just read the PORT service variable even if it is not defined, it will be 8080, however it is not coupled to your other service at all, which isn't something you want given that you want to use reference variables.
2 months ago
!s
Status changed to Solved uxuz • about 2 months ago