I am trying to follow the tutorial here https://channels.readthedocs.io/en/latest/tutorial/part_2.html and check if channel layer can communicate with Redis. The only differ
So I got stuck on this and none of the answers seemed to work for me.
I found that docker would give the container its own IP address. to find the IP address in the command line I used;
'docker ps' to get the container ID. 'docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}} * container-id*' which gave me the IP.
This worked for;
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
"hosts": [('172.20.0.1', 6379)],
},
},
}