add redis password

This commit is contained in:
sbriat 2023-03-16 18:33:14 +01:00
parent 9ce7dd6a0f
commit e1a15c93e5
4 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,7 @@ POSTGRES_IMAGE=postgres:15.0
# REDIS
REDIS_IMAGE=redis:7.0-alpine
REDIS_HOST=v3-user-redis
REDIS_PASSWORD=redis
REDIS_PORT=6379
# CACHE

View File

@ -24,6 +24,7 @@ services:
v3-user-redis:
container_name: v3-user-redis
image: ${REDIS_IMAGE}
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- 6501:6379
volumes:

View File

@ -21,6 +21,7 @@ import { SetConfigurationUseCase } from './domain/usecases/set-configuration.use
config: {
host: configService.get<string>('REDIS_HOST'),
port: configService.get<number>('REDIS_PORT'),
password: configService.get<string>('REDIS_PASSWORD'),
},
}),
}),

View File

@ -39,6 +39,7 @@ import { UserProfile } from './mappers/user.profile';
store: await redisStore({
host: configService.get<string>('REDIS_HOST'),
port: configService.get<number>('REDIS_PORT'),
password: configService.get<string>('REDIS_PASSWORD'),
ttl: configService.get('CACHE_TTL'),
}),
}),