skip to Main Content

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.

2

Answers


  1. 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

    Login or Signup to reply.
  2. I think cube.js doesn’t use your configuration in DEV mode, Try setting CUBEJS_DEV_MODE=false in your env file

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search