nuxt-concierge
nuxt-concierge copied to clipboard
redis connection options issues
This issue consists of two parts
-
When Redis connection options are specified in nuxt.config.ts, it attempts to connect to Redis during
nuxt build, causing the build to block on connection retries. This can make building the app inside a Dockerfile nearly impossible. Whenconcierge.redisis undefined it builds just fine. -
The current handling of
NUXT_REDIS_*environment variables is not very convenient. It would be more practical to defineREDIS_URLorNUXT_REDIS_URLusing theredis://URI scheme and search parameters for customio-redisconfiguration.
https://github.com/genu/nuxt-concierge/blob/master/src/module.ts#L42-L44
In some cases, if DNS resolves to an IPv6 address for NUXT_REDIS_HOST, it may not work because the family for io-redis is not specified. This prevents deploying the application when customizing concierge.redis, leading to infinite connection retries and never-ending builds.
To partially address this with the current env convention, adding NUXT_REDIS_IP_FAMILY to set concierge.redis.family would help.
References:
- Similar Issue (with real-world use case where fly.io internal networking is all IPv6): https://github.com/mastodon/mastodon/issues/27043
- io-redis DNS Lookup: https://redis.github.io/ioredis/index.html#DNSLookupFunction
- Standalone Connection Options: https://redis.github.io/ioredis/index.html#StandaloneConnectionOptions
Also, thanks for the nice project! Hopefully, it can become a popular solution for queues and scheduling in Nuxt. I've used BullMQ in several production projects, finding it reliable and battle-tested. This module offers an incredible nuxt developer experience! And just a side note: It would be cool to have both a concierge folder and its customizable sub-folder locations for adhering to per-project conventions.