diff --git a/testproject/Dockerfile b/testproject/Dockerfile index 1381225..721f12f 100644 --- a/testproject/Dockerfile +++ b/testproject/Dockerfile @@ -22,5 +22,6 @@ RUN git clone https://github.com/andrewgodwin/channels.git /srv/channels/ && \ python setup.py install WORKDIR /srv/channels/testproject/ +ENV REDIS_URL=redis://redis:6379 EXPOSE 80 diff --git a/testproject/testproject/settings.py b/testproject/testproject/settings.py index 741508c..d14a41f 100644 --- a/testproject/testproject/settings.py +++ b/testproject/testproject/settings.py @@ -32,7 +32,7 @@ CHANNEL_LAYERS = { "BACKEND": "asgi_redis.RedisChannelLayer", "ROUTING": "testproject.urls.channel_routing", "CONFIG": { - "hosts": [os.environ.get('REDIS_URL', 'redis://redis:6379')], + "hosts": [os.environ.get('REDIS_URL', 'redis://127.0.0.1:6379')], } }, }