Closed martinpeck closed 6 years ago
@colinschoen @martinpeck whats left on this one? It's the last PR that modifies the Ok.py codebase, so be good to get it merged. Then we have the docs and deployment templates (which depend on this PR) and will have the full solution in in the repo.
This is fine to merge. I was waiting for https://github.com/Cal-CS-61A-Staff/ok/pull/1275 but we can merge this first.
Hi @colinschoen. I don't think #1275 should gate this change. I would suggest (if you're happy) merge this and accept that some of the time sensitive unit tests might not pass.
Thanks @colinschoen!
This pull request adds support for Redis connection URLs such as...
rediss://:reallystrongpassword@myazureredisinstance.redis.cache.example.net:6380/0
This change allows you to configure Redis with a single environment variable, but more importantly it allows secure SSL connections, that are then used by Flask-Cache and RQ, through support of the
rediss://
url scheme.(for more details, see https://www.iana.org/assignments/uri-schemes/prov/rediss)
The changes are relatively simple. The Redis configuration has been refactored, and uses the environment variable
REDIS_URL
if present. Otherwise everything works as it always did with the only change being thatREDIS_PORT
is now a configuration item.I've pulled almost all of the Redis configuration up into
_base.py
and then use overrides inprod.py
.I've also updated the SETUP.md documentation to include a section on configuring Redis. I'm happy to make this clearer if needed.