import os

REDIS_DB_URI = os.getenv("REDIS_DB_URI", "redis://127.0.0.1:6379/0")
REDIS_CACHE_URI = os.getenv("REDIS_CACHE_URI", "redis://127.0.0.1:6379/1")

configs/default/redis.py
import os

REDIS_HOST = os.getenv("REDIS_HOST", "127.0.0.1")
REDIS_DB_URI = os.getenv("REDIS_DB_URI", "redis://"+REDIS_HOST+":6379/0")
REDIS_CACHE_URI = os.getenv("REDIS_CACHE_URI", "redis://"+REDIS_HOST+":6379/1")

configs/default/redis.py
diff --git a/configs/default/redis.py b/configs/default/redis.py
index 4977f7772..8791521e7 100644
--- a/configs/default/redis.py
+++ b/configs/default/redis.py
@@ -1,4 +1,5 @@
 import os
 
-REDIS_DB_URI = os.getenv("REDIS_DB_URI", "redis://127.0.0.1:6379/0")
-REDIS_CACHE_URI = os.getenv("REDIS_CACHE_URI", "redis://127.0.0.1:6379/1")
+REDIS_HOST = os.getenv("REDIS_HOST", "127.0.0.1")
+REDIS_DB_URI = os.getenv("REDIS_DB_URI", "redis://"+REDIS_HOST+":6379/0")
+REDIS_CACHE_URI = os.getenv("REDIS_CACHE_URI", "redis://"+REDIS_HOST+":6379/1")
diff --git a/docker-compose.yml b/docker-compose.yml
index 67394dc85..37733a07c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -52,10 +52,12 @@ services:
       MYSQL_HOST: mysql
       DJANGO_ENV: production
       TZ: Asia/Shanghai
+      REDIS_HOST: redis
     volumes:
       - .:/usr/src/app
     depends_on:
       - mysql
+      - redis
     networks:
       - sspanel
     ports:
@@ -71,10 +73,12 @@ services:
       MYSQL_PASSWORD: yourpass
       MYSQL_HOST: mysql
       DJANGO_ENV: production
+      REDIS_HOST: redis
     volumes:
       - .:/usr/src/app
     depends_on:
       - mysql
+      - redis
     networks:
       - sspanel
     working_dir: /usr/src/app

Bug connecting to 127.0.0.1:6379. Connection refused.
**问题的描述**
登陆或者get请求v2scar对接接口时，出现 **`Error 111 connecting to 127.0.0.1:6379. Connection refused.`**
**项目的配置文件**
使用docker-compose up -d 运行

**如何复现**
登陆就出现

**相关截图/log**
![image](https://user-images.githubusercontent.com/24670858/92043739-3b68b900-edaf-11ea-93ad-d62fd2b9d1f7.png)


**其他信息**
已经提交pr
