Tenho o seguinte conteiner rodando
  redis:
    container_name: redis-cache
    image: redis:7.0-alpine
    ports:
      - 6979:6379
    volumes:
      - redis:/data
    networks:
      - redis
      
networks:
  postgres:
    driver: bridge
  redis:
    driver: bridge
ao usar o redisinsight consigo conectar normalmente usando o host: redis e port: 6379
mas com seguintes configurações em app.module:
    CacheModule.registerAsync({
      useFactory: async () => ({
        store: await redisStore({ ttl: 3600 * 1000, socket:{host: 'redis', port: 6379}}),
      }),
      isGlobal: true,
    }),
o seguinte erro é retornado no terminal
[Nest] 374963  -  ERROR [ExceptionHandler] getaddrinfo EAI_AGAIN redis
Error: getaddrinfo EAI_AGAIN redis
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
com a configuração:
    CacheModule.registerAsync({
      useFactory: async () => ({
        store: await redisStore({ ttl: 3600 * 1000 }),
      }),
      isGlobal: true,
    }),
recebo esse erro:
[Nest] 377343  -   ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:6379
Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)