Merge branch 'redisPassword' into 'main'

add redis password

See merge request v3/service/user!23
This commit is contained in:
Sylvain Briat 2023-03-16 17:37:36 +00:00
commit 1da321240f
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'),
}),
}),