feat: reptile review changes

This commit is contained in:
=
2025-05-21 20:11:59 +05:30
parent bb2a70b986
commit c985690e9a
4 changed files with 9 additions and 24 deletions

View File

@@ -40,7 +40,7 @@ const envSchema = z
REDIS_SENTINEL_MASTER_NAME: zpStr(
z.string().optional().default("mymaster").describe("The name of the Redis master set monitored by Sentinel")
),
REDIS_SENTINEL_ENABLE_TLS: zodStrBool.optional().describe(" Whether to use TLS/SSL for Redis Sentinel connection"),
REDIS_SENTINEL_ENABLE_TLS: zodStrBool.optional().describe("Whether to use TLS/SSL for Redis Sentinel connection"),
REDIS_SENTINEL_USERNAME: zpStr(z.string().optional().describe("Authentication username for Redis Sentinel")),
REDIS_SENTINEL_PASSWORD: zpStr(z.string().optional().describe("Authentication password for Redis Sentinel")),
HOST: zpStr(z.string().default("localhost")),
@@ -284,8 +284,10 @@ const envSchema = z
isRotationDevelopmentMode: data.NODE_ENV === "development" && data.ROTATION_DEVELOPMENT_MODE,
isProductionMode: data.NODE_ENV === "production" || IS_PACKAGED,
isRedisSentinelMode: Boolean(data.REDIS_SENTINEL_HOSTS),
REDIS_SENTINEL_HOSTS: data.REDIS_SENTINEL_HOSTS?.split(",").map((el) => {
const [host, port] = el.split(":");
REDIS_SENTINEL_HOSTS: data.REDIS_SENTINEL_HOSTS?.trim()
?.split(",")
.map((el) => {
const [host, port] = el.trim().split(":");
return { host: host.trim(), port: Number(port.trim()) };
}),
isSecretScanningConfigured:

View File

@@ -70,7 +70,7 @@ export const bootstrapCheck = async ({ db }: BootstrapOpt) => {
if (!redisPing) {
console.error("Redis - Failed to connect");
} else {
console.error("Redis successfully connected");
console.log("Redis successfully connected");
if (appCfg.isRedisSentinelMode) {
console.log("Redis Sentinel Mode");
}

View File

@@ -0,0 +1 @@
HOST_IP=

View File

@@ -1,18 +0,0 @@
port 26379
sentinel resolve-hostnames yes
sentinel monitor mymaster 172.30.0.2 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 60000
# Generated by CONFIG REWRITE
latency-tracking-info-percentiles 50 99 99.9
dir "/data"
user default on nopass sanitize-payload ~* &* +@all
sentinel myid 19849dc6cc6e756dfb0db909c44f0a2f8f5bcbe3
sentinel config-epoch mymaster 0
sentinel leader-epoch mymaster 0
sentinel current-epoch 0
sentinel known-replica mymaster 172.30.0.3 6379
sentinel known-replica mymaster 172.30.0.4 6379