20 days ago
There was an exact same question but no public follow-up: Referencing Service Variables in Shared Variables - Railway Help Station
I ran into the same problem. To elaborate, say:
I have a Redis service deployed, and I will have multiple services using it. It is very intuitive to make the Redis.REDIS_URL a shared variable, so that I don't have to manually set this for all services using the Redis.
But now, say:
We set in shared variable so that:shared.REDIS_URL = ${{Redis.REDIS_URL}}
We have a service Backend. And we add the env var to it:REDIS_URL = ${{shared.REDIS_URL}}
The actual REDIS_URL in Backend will be empty.
I guess the work to enable this feature is non-trivial, due to possible circular referencing. But it is not impossible to tackle, and I believe it can be quite a cool feature that saves time.
5 Replies
20 days ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
20 days ago
Hello,
Until we support this you would want to use service to service reference variables.
Best,
Brody
Status changed to Awaiting User Response Railway • 20 days ago
20 days ago
Hi Brody,
I am just curious. Is Railway planning to support this? 
Status changed to Awaiting Railway Response Railway • 20 days ago
Status changed to Awaiting User Response Railway • 20 days ago
brody
We do not have any current plans to.
20 days ago
Got it! Thanks for sharing!
Status changed to Awaiting Railway Response Railway • 20 days ago
Status changed to Solved 4man-dev • 20 days ago