Fix #640: support connecting with to a password protected redis server

merge-requests/552/head
Eliot Berriot 2018-12-20 17:36:32 +01:00
rodzic ab7c9d511c
commit d27ea30b26
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
4 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -13,7 +13,7 @@ from __future__ import absolute_import, unicode_literals
import datetime
import logging
from urllib.parse import urlparse, urlsplit
from urllib.parse import urlsplit
import environ
from celery.schedules import crontab
@ -420,11 +420,10 @@ CACHES = {
CACHES["default"]["BACKEND"] = "django_redis.cache.RedisCache"
cache_url = urlparse(CACHES["default"]["LOCATION"])
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {"hosts": [(cache_url.hostname, cache_url.port)]},
"CONFIG": {"hosts": [CACHES["default"]["LOCATION"]]},
}
}

Wyświetl plik

@ -0,0 +1,2 @@
Officially support connecting to a password protected redis server, with
the redis://:password@localhost:6379/0 scheme (#640)

Wyświetl plik

@ -70,7 +70,10 @@ REVERSE_PROXY_TYPE=nginx
# Cache configuration
# Examples:
# CACHE_URL=redis://<host>:<port>/<database>
# CACHE_URL=redis://localhost:6379/0
# CACHE_URL=redis://localhost:6379/0c
# With a password:
# CACHE_URL=redis://:password@localhost:6379/0
# (the extra semicolon is important)
# Use the next one if you followed Debian installation guide
# CACHE_URL=redis://127.0.0.1:6379/0

Wyświetl plik

@ -99,7 +99,7 @@ services:
- "FUNKWHALE_FRONT_PORT=${VUE_PORT-8080}"
- "COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME- }"
- "FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-localhost}"
links:
depends_on:
- api
- front
volumes: