Connecting to Redis Server For Deployment of Next-ts web app- How to Specify Remote URL in .env File?

19 Views Asked by At

Title: Redis Deployment Issue on render.com

Body: I'm facing an issue deploying my project on render.com that uses Redis. Without Redis-server running, I get the error:

Redis error:  Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
  errno: -4078,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379
}

Considering deploying a Redis server on a cloud instance, using a remote URL in the .env file:

REDIS_URL=redis://user:password@cloud-instance-hostname:port

Is this the right approach for render.com, and are there any key considerations? Any advice appreciated!

I was wondering if i can create a cloud instance for redis to run server and use that URL or what else is the solution?

0

There are 0 best solutions below