From 763682462cbcc41bee79fa42c9521ef3a652d02e Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Tue, 12 Nov 2024 13:08:37 +0200 Subject: [PATCH] fix: Do not autoindex by default --- apps/api/src/config/env.validators.ts | 4 ++-- apps/webhook/src/config/env.validators.ts | 4 ++-- apps/worker/src/config/env.validators.ts | 4 ++-- apps/ws/src/config/env.validators.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/api/src/config/env.validators.ts b/apps/api/src/config/env.validators.ts index 4f6a4b3b87f..48b59e78f55 100644 --- a/apps/api/src/config/env.validators.ts +++ b/apps/api/src/config/env.validators.ts @@ -26,8 +26,8 @@ export const envValidators = { JWT_SECRET: str(), SENDGRID_API_KEY: str({ default: '' }), /** @deprecated - use `MONGO_AUTO_CREATE_INDEXES` instead */ - AUTO_CREATE_INDEXES: bool({ default: true }), - MONGO_AUTO_CREATE_INDEXES: bool({ default: true }), + AUTO_CREATE_INDEXES: bool({ default: false }), + MONGO_AUTO_CREATE_INDEXES: bool({ default: false }), MONGO_MAX_IDLE_TIME_IN_MS: num({ default: 1000 * 30 }), MONGO_MAX_POOL_SIZE: num({ default: 50 }), MONGO_MIN_POOL_SIZE: num({ default: 10 }), diff --git a/apps/webhook/src/config/env.validators.ts b/apps/webhook/src/config/env.validators.ts index ad04948a6b0..e6a4d0e61ab 100644 --- a/apps/webhook/src/config/env.validators.ts +++ b/apps/webhook/src/config/env.validators.ts @@ -9,8 +9,8 @@ export type ValidatedEnv = StringifyEnv>; export const envValidators = { /** @deprecated - use `MONGO_AUTO_CREATE_INDEXES` instead */ - AUTO_CREATE_INDEXES: bool({ default: true }), - MONGO_AUTO_CREATE_INDEXES: bool({ default: true }), + AUTO_CREATE_INDEXES: bool({ default: false }), + MONGO_AUTO_CREATE_INDEXES: bool({ default: false }), MONGO_MAX_IDLE_TIME_IN_MS: num({ default: 1000 * 30 }), MONGO_MAX_POOL_SIZE: num({ default: 50 }), MONGO_MIN_POOL_SIZE: num({ default: 10 }), diff --git a/apps/worker/src/config/env.validators.ts b/apps/worker/src/config/env.validators.ts index 8c73860d22b..ce5d1f6257f 100644 --- a/apps/worker/src/config/env.validators.ts +++ b/apps/worker/src/config/env.validators.ts @@ -52,8 +52,8 @@ export const envValidators = { REDIS_CACHE_FAMILY: str({ default: undefined }), REDIS_CACHE_KEY_PREFIX: str({ default: undefined }), /** @deprecated - use `MONGO_AUTO_CREATE_INDEXES` instead */ - AUTO_CREATE_INDEXES: bool({ default: true }), - MONGO_AUTO_CREATE_INDEXES: bool({ default: true }), + AUTO_CREATE_INDEXES: bool({ default: false }), + MONGO_AUTO_CREATE_INDEXES: bool({ default: false }), MONGO_MAX_IDLE_TIME_IN_MS: num({ default: 1000 * 30 }), MONGO_MAX_POOL_SIZE: num({ default: 50 }), MONGO_MIN_POOL_SIZE: num({ default: 10 }), diff --git a/apps/ws/src/config/env.validators.ts b/apps/ws/src/config/env.validators.ts index 35c9ac2fb01..02ed369378b 100644 --- a/apps/ws/src/config/env.validators.ts +++ b/apps/ws/src/config/env.validators.ts @@ -10,8 +10,8 @@ export type ValidatedEnv = StringifyEnv>; export const envValidators = { JWT_SECRET: str(), /** @deprecated - use `MONGO_AUTO_CREATE_INDEXES` instead */ - AUTO_CREATE_INDEXES: bool({ default: true }), - MONGO_AUTO_CREATE_INDEXES: bool({ default: true }), + AUTO_CREATE_INDEXES: bool({ default: false }), + MONGO_AUTO_CREATE_INDEXES: bool({ default: false }), MONGO_MAX_IDLE_TIME_IN_MS: num({ default: 1000 * 30 }), MONGO_MAX_POOL_SIZE: num({ default: 50 }), MONGO_MIN_POOL_SIZE: num({ default: 10 }),