Running redis with docker compose

version: '3'
services:

  postgres:
    image: postgres
    environment:
      - POSTGRES_USER=${DB_USERNAME}
      - POSTGRES_PASSWORD=${DB_PASSWORD}
      - POSTGRES_DB=${DB_DATABASE}
    ports:
      - "5674:5432"
    volumes:
      - ./data/db_data:/var/lib/postgresql/data
  redis_cache:
    image: bitnami/redis
    ports:
      - "6379:6379"
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
  app:
    image: asobooks-api
    ports:
      - 3000:3000
    environment:
      PORT: 3000
      NODE_ENV: prod
      DB_CONNECTION: postgres
      DB_HOST: postgres
      DB_USERNAME: ${DB_USERNAME}
      DB_PASSWORD: ${DB_PASSWORD}
      DB_DATABASE: ${DB_DATABASE}
      DB_PORT: 5432
      REDIS_PORT: 6379
    depends_on:
      - postgres
      - redis_cache
    command:
      [
        'node',
        'dist/src/main.js'
      ]

I have been trying this for about 2 days now and unfortunately, the app container fails to connect to Redis.
Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379

Here is the connection.

      name: Queues.EMAIL,
      redis: {
        port: 6379,
        host: 'redis_cache',
      },
    })

Please help me with this thing it works without using docker. But fails when I run in containers. Thanks.

Source: Docker Questions