Environment variable to reference other environment variables

Hello, in railway, are environment variables able to reference other variables? I.e. for ASP.NET to set ports i would use ASPNETCORE_URLS variable with value
"http://+:80"
"http://+:80"
, so should i be able to reference PORT variable in it's value? I mean something like
"http://+:${PORT}"
"http://+:${PORT}"
. Thanks.
14 Replies
Percy
Percy17mo ago
Project ID: d9584449-f807-4d25-b807-f765ae62e699
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
d9584449-f807-4d25-b807-f765ae62e699
Solution
Brody
Brody17mo ago
Tiago Uabeiro
Tiago Uabeiro17mo ago
${{ENV_VARIABLE}}
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
Uh-huh, so double brackets should do the trick, i'll try it out, thanks!
Brody
Brody17mo ago
but word of warning, to use the PORT variable in a reference, you would need to add a PORT variable to the service variables yourself
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
So something like this?
Brody
Brody17mo ago
no, it doesn't need to be a shared variable
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
Just set the PORT to some value then?
Brody
Brody17mo ago
just a regular service variable yep, you can remove the PORT from the shared variables
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
Do`h I thought it was shared by default, I guess i added it myself
Brody
Brody17mo ago
no need for a shared PORT variable
НЄЛЬЗЯ СОТВОРІТЬ ЗДЄСЬ
Understood, thanks) And it works, thanks again)
Brody
Brody17mo ago
no problem!
Want results from more Discord servers?
Add your server