title: docker-compose redis connection issue
body: <p>I have been trying to dockerize an api . But redis crashes. Nodejs and mongodb work.</p>
  <p>Docker-compose.yaml file</p>
  <pre><code>version: '3'
  services:
  
    mongo:
      container_name: mongo
      image: mongo
      networks:
        - webnet
      ports:
        - '27017:27017'
    redis: 
      image: redis
      container_name: redis
      command: [&quot;redis-server&quot;,&quot;--bind&quot;,&quot;redis&quot;,&quot;--port&quot;,&quot;6379&quot;]
      ports:
        - '6379:6379'
      hostname: redis
  
    app:
      container_name: password-manager-docker
      restart: always
      build: .
      networks:
        - webnet
      ports:
        - '80:5000'
      links: 
        - mongo
        - redis
      environment: 
        MONGODB_URI: ${MONGODB_URI}
        clientID: ${clientID}
        clientSecret : ${clientSecret}
        PORT: ${PORT}
        NODE_ENV : ${NODE_ENV}
        JWT_SECRET_KEY: ${JWT_SECRET_KEY}
        JWT_EXPIRE: ${JWT_EXPIRE}
        REFRESH_TOKEN: ${REFRESH_TOKEN}
        JWT_REFRESH_SECRET_KEY: ${JWT_REFRESH_SECRET_KEY}
        JWT_REFRESH_EXPIRE: ${JWT_REFRESH_EXPIRE}
        JWT_COOKIE: ${JWT_COOKIE}
         
  networks:
    webnet:
  </code></pre>
  <p>Docker file</p>
  <pre><code>FROM node:latest
  
  WORKDIR /usr/src/app
  
  COPY package*.json ./
  
  RUN npm install 
  
  COPY . .
  
  EXPOSE 5000
  
  CMD [&quot;npm&quot;,&quot;start&quot;]
  </code></pre>
  <p>The error is Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379.
  How can I fix this ?</p>