mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Added redis-commander webui and fixed some missing dependencies
This commit is contained in:
parent
e5ec1c9c56
commit
f63f78f26d
3 changed files with 14 additions and 1 deletions
|
@ -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.
|
@ -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",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue