replicate / cog

Containers for machine learning
https://cog.run
Apache License 2.0
8.06k stars 560 forks source link

Add support for a Redis DSN #561

Open josegonzalez opened 2 years ago

josegonzalez commented 2 years ago

Rather than specifying parameters separately, it would be nice to be able to specify a DSN connection string like so:

# from the environment
REDIS_URL=redis://user:auth@localhost:6379/0

Other parameters can be querystring parameters on the DSN, but should have some defaults that make it work out of the box.

DSNs are fairly standard ways of specifying connection information, and not needing to parse them and manually set the values would be nice.

sprite2005 commented 2 years ago

I was going to open an issue for adding support for a redis password, but this would solve that nicely.