You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BullMq works fine when I work locally. When I run docker compose build there is no more BullMq redis connection. I have used IOredis for data caching in the same service and it works fine
first option
export const emailQueue = new Queue(ENUM_QUEUE_NAME.email, {
connection: {
host: 'redis', // Replace with your redis container name (if different)
port: 6379,
}}
secound option
export const emailQueue = new Queue(ENUM_QUEUE_NAME.email, {
connection: {
host: ''127.0.0.1'', // Replace with your redis container name (if different)
port: 6379,
},
Version
5.12.14
Platform
NodeJS
What happened?
BullMq works fine when I work locally. When I run docker compose build there is no more BullMq redis connection. I have used IOredis for data caching in the same service and it works fine
first option
export const emailQueue = new Queue(ENUM_QUEUE_NAME.email, {
connection: {
host: 'redis', // Replace with your redis container name (if different)
port: 6379,
}}
secound option
export const emailQueue = new Queue(ENUM_QUEUE_NAME.email, {
connection: {
host: ''127.0.0.1'', // Replace with your redis container name (if different)
port: 6379,
},
docker compose
version: '3'
services:
dr_mazen_app:
build:
context: .
dockerfile: Dockerfile
ports:
- '5010:5003'
- '5011:5004'
depends_on:
- redis
- mongodb
- zookeeper
- kafka
environment:
- REDIS_URL=redis://redis:6379
- REDIS_HOST=redis
- REDIS_PORT=6379
- DATABASE_URL_ATLAS=mongodb://mongodb:27017/renti_v2
networks:
- default
redis:
image: redis:latest
ports:
- '6379:6379'
volumes:
- redis_data:/data # Named volume for Redis data
networks:
- default
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1605:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379 }
How to reproduce.
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: