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