a year ago
I want to set up Valkey with Directus, but I am failing to do so.
Step 1.) Deployed the Directus + Postgres template. Added Valkey from the template. Everything is running after this step.
Step 2.) Now I am adding the following variables to Directus based on the Directus config docs (https://docs.directus.io/self-hosted/config-options.html#redis)
REDIS_ENABLED="true"
REDIS="${{Valkey.VALKEY_URL}}"
REDIS_HOST="${{Valkey.VALKEY_HOST}}"
REDIS_PORT="${{Valkey.VALKEY_PORT}}"
REDIS_USERNAME="${{Valkey.VALKEY_USER}}"
REDIS_PASSWORD="${{Valkey.VALKEY_PASSWORD}}"
CACHE_ENABLED="true"
CACHE_STORE="redis"
When deploying I get the following error: at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:111:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND valkey.railway.internal
all the variables exist in Valkey (they come with the template) and the railway privat url is listed as valkey.railway.interal as well, but somehow Directus can't communicate with it (I guess).
any clue? thx
9 Replies
a year ago
Hey, I see you're using ioredis.
There is a known issue on Railway with this library. Are you able to use a full URL instead of individual host, port, username?
a year ago
Let me check the docs actually
a year ago
Yeah. Delete everything other than REDIS and set it to the following:
a year ago
${{Valkey.VALKEY_URL}}?family=0
Status changed to Solved brody • 12 months ago
a year ago
thanks @Loudbook
a year ago
!s