change to tls & remote
This commit is contained in:
parent
244fbe78ed
commit
3b0196bd66
|
|
@ -2,6 +2,7 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Redis } from 'ioredis';
|
import { Redis } from 'ioredis';
|
||||||
import { BusinessListing, InvestmentsListing,ProfessionalsBrokersListing } from '../models/main.model.js';
|
import { BusinessListing, InvestmentsListing,ProfessionalsBrokersListing } from '../models/main.model.js';
|
||||||
|
import fs from 'fs-extra';
|
||||||
|
|
||||||
export const LISTINGS = 'LISTINGS';
|
export const LISTINGS = 'LISTINGS';
|
||||||
export const SUBSCRIPTIONS = 'SUBSCRIPTIONS';
|
export const SUBSCRIPTIONS = 'SUBSCRIPTIONS';
|
||||||
|
|
@ -9,8 +10,16 @@ export const USERS = 'USERS'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RedisService {
|
export class RedisService {
|
||||||
private redis = new Redis(); // Verbindungsparameter nach Bedarf anpassen
|
// private redis = new Redis(); // Verbindungsparameter nach Bedarf anpassen
|
||||||
|
private redis = new Redis({
|
||||||
|
port: 6379, // Der TLS-Port von Redis
|
||||||
|
host: '2.56.188.138',
|
||||||
|
tls: {
|
||||||
|
// Pfad zu lokalen Kopien der Redis-Zertifikatdateien
|
||||||
|
key: fs.readFileSync('/etc/ssl/private/redis.key'),
|
||||||
|
cert: fs.readFileSync('/etc/ssl/certs/redis.crt')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// ######################################
|
// ######################################
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue