Added redis-commander webui and fixed some missing dependencies

This commit is contained in:
Keannu Bernasol 2023-09-12 22:37:36 +08:00
parent e5ec1c9c56
commit f63f78f26d
3 changed files with 14 additions and 1 deletions

View file

@ -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

Binary file not shown.

View file

@ -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",
}