Redis works on deployment , It doesn’t work on production with docker and heroku

I am trying to develop an express api.It works on local machine as expected. I am using docker but on production with docker and heroku redis is not working

Dockerfile

FROM node:latest

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install 

COPY . .

EXPOSE 5000

CMD ["npm","start"]

docker.compose.yml file

version: '3'
services:

  mongo:
    container_name: mongo
    image: mongo
  
    ports:
      - '27017:27017'
  redis:
    container_name: redis
    image: redis
    

  app:
    container_name: password-manager-docker
    image: app
    restart: always
    build: .
    
    ports:
      - '80:5000'
    links: 
      - mongo
      - redis
    environment: 
      MONGODB_URI: ${MONGODB_URI}
      clientID: ${clientID}
      clientSecret : ${clientSecret}
      PORT: ${PORT}
      REDIS_HOST: ${REDIS_HOST}
      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}
      SMTP_HOST: ${SMTP_HOST}
      SMTP_PORT: ${SMTP_PORT}
      SMTP_USER: ${SMTP_USER}
      SMTP_PASS: ${SMTP_PASS}

redis file

const asyncRedis = require('async-redis');
//process.env.REDIS_HOST's value is redis
const redisClient = asyncRedis.createClient({port:6379,host:process.env.REDIS_HOST || "127.0.0.1"});
redisClient.on("connect",() => {
  console.log(`Redis: ${host}:${port}`);
})
redisClient.on('error', function(err) {
  // eslint-disable-next-line no-console
  console.log(`[Redis] Error ${err}`);
});

The error on heroku is "[Redis] Error Error: Redis connection to 127.0.0.1:6379 failed – connect ECONNREFUSED 127.0.0.1:6379". It worked without docker on heroku but not It is not working. Thanks for your help

Source: Docker Questions