-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
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
Can't config with Heroku REDIS_URL #290
Comments
I have the same question. I need to use Exq with an externally hosted Redis service, so I need to be able to provide it with a See here for an example: https://openredis.com/docs/api |
I think there are two different situations here. The first situation @AugustoPedraza - you should be able to specify a :url property with this and have that work. That should work, but even if that URL doesn't parse correctly, you should still be able to break it up into the parts and specify them separately. The second situation @egeersoz is basically a dynamic URL that is returned via a curl request. With the current code base, one option is to write a start wrapper bash script that curls that endpoint and then sets the environment variable for REDIS connection info based on the returned data. You can then use environment variable option in the config to read those. The codebase can probably be modified to make this easier to specify dynamic configs (similar to Phoenix), but I don't have time to implement this (but would look at a PR). |
@AugustoPedraza I setup something like this:
Of course even easier would be to break up the URI into their own individual Heroku ENV variables. |
For the ones on heroku's redis the solution of @daneb is the one I ended up with. Sometimes Heroku change the REDIS_URL, so if you break up the URI into individual env vars you will have some problems...
|
With Redix 1.2.0 there is a function available to parse the Heroku connection string: |
How should I use the following Redis URL to connect?
redis://h:77cp773ab5102292b1632dd060f3ae366ce745c845cfc473fd7d9a4b10662caaf@ec2-35-224-34-235.cxfgte-1.amaaggrnaws.com:32959
The text was updated successfully, but these errors were encountered: