title: | [ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis redis:6379 collector
body: <p>I am rather new to redis and do not understand the error and the reason's why. I am running the below services in a docker-compose.yml environment</p>
  <pre><code>  redis:
      image: redis:5.0.3
      
      restart: always
      deploy:
        resources:
          limits:
            memory: &quot;100M&quot;
  
    collector:
      container_name: collector
      image: registry.gitlab.com/collector
      networks:
        - traefik-public
      restart: always
      environment:
        NODE_ENV: production
        NODE_CONFIG: '{&quot;redis&quot;:&quot;redis://redis:6379&quot;}'
        GRPC_LISTEN_ADDRESS: &quot;0.0.0.0:10000&quot;
      extra_hosts:
        - &quot;telegraf.company.internal:127.0.0.1&quot;
      deploy:
        resources:
          limits:
            memory: &quot;900M&quot;
  
  networks:
    traefik-public:
        external: true
  </code></pre>
  <p>this is the error message:</p>
  <pre><code>  | [ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis redis:6379
    |     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
  </code></pre>
  <p>any advice? thanks!</p>