diff --git a/docker-compose.yml b/docker-compose.yml index aeb3df5..f605188 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,17 @@ services: depends_on: - redis # Add this to make sure Django can reach the Redis server + redis-commander: + container_name: redis-commander + hostname: redis-commander + image: rediscommander/redis-commander:latest + build: . + restart: always + environment: + - REDIS_HOSTS=redis + ports: + - "8444:8081" + # Redis Server redis: image: redis:latest diff --git a/linux-requirements.txt b/linux-requirements.txt index 4c55c0c..a737de0 100644 Binary files a/linux-requirements.txt and b/linux-requirements.txt differ diff --git a/stude/config/settings.py b/stude/config/settings.py index a4dfed3..6a987a4 100644 --- a/stude/config/settings.py +++ b/stude/config/settings.py @@ -103,7 +103,9 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', "whitenoise.middleware.WhiteNoiseMiddleware", 'django.contrib.sessions.middleware.SessionMiddleware', + "django.middleware.cache.UpdateCacheMiddleware", 'django.middleware.common.CommonMiddleware', + "django.middleware.cache.FetchFromCacheMiddleware", 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', @@ -269,7 +271,7 @@ REDIS_PORT = os.getenv('REDIS_PORT', 6379) CACHES = { "default": { "BACKEND": "django_redis.cache.RedisCache", - "LOCATION": "redis://redis:6379/1", + "LOCATION": "redis://redis:6379/0", "OPTIONS": { "CLIENT_CLASS": "django_redis.client.DefaultClient", }