Skip to content
Unable to access REDIS_URL
arvind-chandrasekaran
OP

2 months ago

I have a Redis template and another container deployed in the same project. I am unable access the REDIS_URL in the second container despite adding the REDIS_URL to the variables in this service.

Solved

1 Reply

Railway
BOT

2 months ago

The variable you added to that service has not been deployed yet. It is sitting in your environment's staged changes (the pending changes bar), so the running container never received it. It is also saved under the name REDIS_PRIVATE_URL, not REDIS_URL, so code that reads REDIS_URL will not find it even after it deploys.

In the service's Variables tab, add REDIS_URL with a reference to the Redis service, for example ${{YourRedisServiceName.REDIS_URL}} using the exact name of the Redis service on your canvas. The autocomplete dropdown in the value field fills this in for you. Then apply the staged changes with Deploy.

Before you deploy, review the pending changeset: it also includes deleting an older Redis service and its volume that you removed earlier, so dismiss that part if it was not intended.


Status changed to Awaiting User Response Railway • about 2 months ago


Railway
BOT

a month ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...