10 months ago
I need help, im confused with the documentation.
I have 2 redis server running. 1 for dev and 1 for production. Also I have 2 apis 1 for dev and 1 for production.
now, i want to
api dev - connect to redis dev env
api prod - connect to redis prod env
Based from docs[https://docs.railway.app/guides/variables#referencing-another-services-variable] I can use reference variable.
My question is that, how will i know that when i use Redis.REDISHOSTRedis.REDISPASSWORD
etc… it will use the correct Redis service env
Redis ProjectID: ec7a6b3f-46c6-4337-a5f5-60c433fe477c/service/3579cf7f-6608-4ec1-aece-88cb82fc989d
Nodejs/NestJs ProjectID: d85df9df-e8f2-42e7-81ea-4e1929823be4
0 Replies
Project ID: d85df9df-e8f2-42e7-81ea-4e1929823be4/service/04f7bad6-9243-4163-81f6-648ad8ec8daf
error
ERROR [ExceptionHandler] getaddrinfo ENOTFOUND redis-0fvm.railway.internal
10 months ago
You should use Railway environments for this stuff.