3

If I want to connect cube.js to my own built redis, what should I do. I use CUBEJS_REDIS_URL which is claimed by official document. So, for example, if my own redis port is 31.71.195.218. Should I use write CUBEJS_REDIS_URL=redis://31.71.195.218:6379/0 in my backend .env file? I use many combination like, redis://31.71.195.218:6379, redis://31.71.195.218, ecc.

However, they all show the following error message:

process in uncaughtException:  { Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379 }

in my terminal. It seems that this environment variable CUBEJS_REDIS_URL isn't used.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Ezra Tsai
  • 43
  • 2

2 Answers2

1

I think cube.js doesn't use your configuration in DEV mode, Try setting CUBEJS_DEV_MODE=false in your env file

Kaizendae
  • 853
  • 11
  • 24
0

I think you need to pass the env variables into the Docker container. Please see this example in the documentation: https://cube.dev/docs/deployment/platforms/docker