Remove redis from prod
This commit is contained in:
@@ -27,29 +27,29 @@ import { ScheduleModule } from '@nestjs/schedule';
|
||||
isGlobal: true,
|
||||
load: [configuration],
|
||||
}),
|
||||
CacheModule.registerAsync<RedisClientOptions>({
|
||||
isGlobal: true,
|
||||
imports: [ConfigModule],
|
||||
inject: [ConfigService],
|
||||
useFactory: async (configService: ConfigService) => ({
|
||||
store: redisStore as unknown as CacheStoreFactory,
|
||||
ttl: configService.get<number>('CACHE_TTL', 5),
|
||||
// Store-specific configuration:
|
||||
password: configService.get<string>('REDIS_PASS', ''),
|
||||
host: configService.get<string>('REDIS_HOST', 'localhost'),
|
||||
port: configService.get<number>('REDIS_PORT', 6379),
|
||||
db: configService.get<number>('REDIS_DB', 1),
|
||||
}),
|
||||
}),
|
||||
// CacheModule.registerAsync<RedisClientOptions>({
|
||||
// isGlobal: true,
|
||||
// imports: [ConfigModule],
|
||||
// inject: [ConfigService],
|
||||
// useFactory: async (configService: ConfigService) => ({
|
||||
// store: redisStore as unknown as CacheStoreFactory,
|
||||
// ttl: configService.get<number>('CACHE_TTL', 5),
|
||||
// // Store-specific configuration:
|
||||
// password: configService.get<string>('redis.pass', ''),
|
||||
// host: configService.get<string>('redis.host', 'localhost'),
|
||||
// port: configService.get<number>('redis.port', 6379),
|
||||
// db: configService.get<number>('redis.db', 1),
|
||||
// }),
|
||||
// }),
|
||||
BullModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
inject: [ConfigService],
|
||||
useFactory: async (configService: ConfigService) => ({
|
||||
redis: {
|
||||
password: configService.get<string>('REDIS_PASS', ''),
|
||||
host: configService.get<string>('REDIS_HOST', 'localhost'),
|
||||
port: configService.get<number>('REDIS_PORT', 6379),
|
||||
db: configService.get<number>('REDIS_DB', 1),
|
||||
password: configService.get<string>('redis.pass', ''),
|
||||
host: configService.get<string>('redis.host', 'localhost'),
|
||||
port: configService.get<number>('redis.port', 6379),
|
||||
db: configService.get<number>('redis.db', 1),
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
@@ -11,4 +11,10 @@ export default () => ({
|
||||
channel: process.env.IRC_CHANNEL ?? '#usdev',
|
||||
password: process.env.IRC_PASSWORD ?? '',
|
||||
},
|
||||
redis: {
|
||||
host: process.env.REDIS_HOST ?? 's3.hooli.co',
|
||||
port: parseInt(process.env.REDIS_PORT ?? '6379'),
|
||||
password: process.env.REDIS_PASS ?? '',
|
||||
db: parseInt(process.env.REDIS_DB ?? '1'),
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user