We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm run docker:start
Brief Description npm run docker:start can't connect to Redis
Severity Low
Steps to Reproduce in .env set
REDIS_HOSTNAME=redis
Try to run locally with docker
Expected Results/Behaviour You see
{ name: 'redisConnect', value: 'Redis: Connection to redis ready' }
Actual Results/Behaviour
Redis: Unable to connect to the redis database: ConnectionTimeoutError: Connection timeout
Workaround
diff --git a/config/redis.js b/config/redis.js index 3c64d21..20545d3 100644 --- a/config/redis.js +++ b/config/redis.js @@ -3,9 +3,9 @@ import config from './config.js'; let connectionOptions = {}; // https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-connection -if (config.REDIS_KEY && config.REDIS_HOSTNAME) { +if (config.REDIS_HOSTNAME) { connectionOptions = { - url: `rediss://${config.REDIS_HOSTNAME}:${config.REDIS_PORT}`, + url: `redis://${config.REDIS_HOSTNAME}:${config.REDIS_PORT}`, password: config.REDIS_KEY, socket: { connectTimeout: 5000,
First line change needed as there is no key and we still want to set up all the fancy stuff.
Second line change needed as there is no SSL on the Redis Docker.
I guess we'll need to add a config.REDIS_SSL option
The text was updated successfully, but these errors were encountered:
Or we assume production always uses SSL and dev never does, and after line 29 just add:
} else { connectionOptions = { url: `redis://${config.REDIS_HOSTNAME}:${config.REDIS_PORT}` } }
Sorry, something went wrong.
No branches or pull requests
Brief Description
npm run docker:start
can't connect to RedisSeverity
Low
Steps to Reproduce
in .env set
Try to run locally with docker
Expected Results/Behaviour
You see
Actual Results/Behaviour
Workaround
First line change needed as there is no key and we still want to set up all the fancy stuff.
Second line change needed as there is no SSL on the Redis Docker.
I guess we'll need to add a config.REDIS_SSL option
The text was updated successfully, but these errors were encountered: