Skip to content

Commit

Permalink
Merge branch 'fork/taylor-fuller/specify-redis-ssl-cert-reqs'
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Sep 25, 2024
2 parents af19f88 + 1a1f631 commit 7c74ccf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Developers
* Ethan Winters - https://github.com/ebwinters
* Dieter Plaetinck - https://github.com/Dieterbe
* Jonathan La Field - https://github.com/JLaField
* Taylor Fuller - https://github.com/taylor-fuller


Translators
Expand Down
19 changes: 18 additions & 1 deletion extras/docker/development/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,31 @@
'LOCATION': env.str("DJANGO_CACHE_LOCATION"),
'TIMEOUT': env.int("DJANGO_CACHE_TIMEOUT"),
'OPTIONS': {
'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS"),
'CLIENT_CLASS': env.str("DJANGO_CACHE_CLIENT_CLASS")
}
}
}

if os.environ.get('DJANGO_CACHE_CLIENT_PASSWORD'):
CACHES['default']['OPTIONS']['PASSWORD'] = env.str('DJANGO_CACHE_CLIENT_PASSWORD')

CONNECTION_POOL_KWARGS = dict()
if "DJANGO_CACHE_CLIENT_SSL_KEYFILE" in os.environ:
CONNECTION_POOL_KWARGS['ssl_keyfile'] = env.str("DJANGO_CACHE_CLIENT_SSL_KEYFILE")

if "DJANGO_CACHE_CLIENT_SSL_CERTFILE" in os.environ:
CONNECTION_POOL_KWARGS['ssl_certfile'] = env.str("DJANGO_CACHE_CLIENT_SSL_CERTFILE")

if "DJANGO_CACHE_CLIENT_SSL_CERT_REQS" in os.environ:
CONNECTION_POOL_KWARGS['ssl_cert_reqs'] = env.str("DJANGO_CACHE_CLIENT_SSL_CERT_REQS")

if "DJANGO_CACHE_CLIENT_SSL_CHECK_HOSTNAME" in os.environ:
CONNECTION_POOL_KWARGS['ssl_check_hostname'] = env.bool(
"DJANGO_CACHE_CLIENT_SSL_CHECK_HOSTNAME")

if CONNECTION_POOL_KWARGS:
CACHES["default"]["OPTIONS"]["CONNECTION_POOL_KWARGS"] = CONNECTION_POOL_KWARGS

# Folder for compressed CSS and JS files
COMPRESS_ROOT = STATIC_ROOT

Expand Down

0 comments on commit 7c74ccf

Please sign in to comment.