How to expose Redis port in DDEV?

54 Views Asked by At

I'm using DDEV v1.22.6 with the ddev-redis service. How can I expose the Redis port? I'd like to connect to Redis in the RedisInsight app.

1

There are 1 best solutions below

0
On BEST ANSWER

To expose a non-http port (I think redis is non-http) try using the ports key in the docker-compose.redis_extra.yaml override file. Expose the port you want with ports and see how it goes. Unfortunately, the port will need to be different for each project, or you'll have conflicts over it.

For example, your docker-compose.redis_extra.yaml might have

services:
  redis:
    ports:
    - 6379:6379

But you might want to try using redis-commander instead, which is running inside the docker network and doesn't have to have the redis port exposed to the outer network. https://github.com/ddev/ddev-redis-commander