zero-to-production icon indicating copy to clipboard operation
zero-to-production copied to clipboard

Local docker container error

Open w1n5t0n99 opened this issue 3 years ago • 1 comments

Hello,

Attempting to run the container locally fails to connect to the local Redis container initialized with init_redis.sh. The error returned is Error: Could not connect to Redis database

Caused by: Connection refused (os error 111)

The application runs fine locally when not in a container.

w1n5t0n99 avatar Jun 15 '22 05:06 w1n5t0n99

This is most likely an issue related to how the Docker networking is setup on your machine 🤔

LukeMathWalker avatar Jul 05 '22 17:07 LukeMathWalker

I managed to get this working by using the name of the redis container in the URI instead of 127.0.0.1. I'm currently passing that to my app instances using the environment variable config override:

APP_REDIS_URI="redis://<REDIS_CONTAINER_NAME>:6379"

bendoerry avatar Nov 27 '22 13:11 bendoerry