2 years ago
Hi,
I have troubles connecting the Redis to the main service. I have the REDIS_URL variable added, but it just looks like the code doesn't read it. Can you please help me? I'm not a really experienced coder.
View Deploy details
15 Replies
2 years ago
Please send the code you expect to be reading the env variable
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
'hosts': [
os.environ.get('REDIS_URL', 'redis://localhost:6379')
],
},
},
}
I've got this in my settings.py
${{ Redis.REDIS_URL }}
and this is the variable that I use
2 years ago
I'm not Adam but no it wouldn't be enough information for him, please provide the full error
I've added the REDIS_URL to the service that runs the Django project. Even though Isee REDIS_URL in the service’s environment variables in the Railway dashboard, the container doesn’t actually receive it at runtime. I've confirmed it with running a debug and that return that there is no connection with the REDIS_URL. I would like to get some help why the REDIS_URL variable isn't passed into the container at runtime.
2 years ago
screenshot of your service variables with everything still hidden please
2 years ago
show the debug log now please
2 years ago
are you using a Dockerfile
2 years ago
please see these docs -


