In order to support configuring the Redis connection at runtime, this pull request adds support for reading the connection URL from a {:system, "ENVIRONMENT_VARIABLE"} tuple.
This makes it much easier, for example, for a Phoenix app hosted on Heroku to react to changes in a REDIS_URL environment variable that will trigger an application restart.
I'm not sure this is the right approach—perhaps other options should support a system tuple, as well, or there may be a better way of implementing this altogether. I just wanted to open this more as a feature suggestion/point of conversation.
We are moving away from {:system, ...} tuples in general, especially with the addition of releases. The ones in Phoenix has been deprecated, so we probably shouldn't add this one here. :)
In order to support configuring the Redis connection at runtime, this pull request adds support for reading the connection URL from a
{:system, "ENVIRONMENT_VARIABLE"}
tuple.This makes it much easier, for example, for a Phoenix app hosted on Heroku to react to changes in a
REDIS_URL
environment variable that will trigger an application restart.I'm not sure this is the right approach—perhaps other options should support a system tuple, as well, or there may be a better way of implementing this altogether. I just wanted to open this more as a feature suggestion/point of conversation.