8 months 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)
REDISENABLED="true" REDIS="${{Valkey.VALKEYURL}}"
REDISHOST="${{Valkey.VALKEYHOST}}"
REDISPORT="${{Valkey.VALKEYPORT}}"
REDISUSERNAME="${{Valkey.VALKEYUSER}}"
REDISPASSWORD="${{Valkey.VALKEYPASSWORD}}"
CACHEENABLED="true" CACHESTORE="redis"
When deploying I get the following error: at GetAddrInfoReqWrap.onlookup as oncomplete
[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
8 months 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?
8 months ago
Let me check the docs actually
8 months ago
Yeah. Delete everything other than REDIS and set it to the following:
8 months ago
${{Valkey.VALKEY_URL}}?family=0
Status changed to Solved brody • 8 months ago
8 months ago
thanks @Loudbook
8 months ago
!s