From 93f3ee2822df1e161eec9d5f26bf5facc493ff42 Mon Sep 17 00:00:00 2001 From: princegupta1131 <114015020+princegupta1131@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:31:02 +0530 Subject: [PATCH 1/5] Fix PostgreSQL to yugabyte connection settings and improve error logging --- src/utils/postgresConnection.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/postgresConnection.ts b/src/utils/postgresConnection.ts index f78bd9f..a8ac65a 100644 --- a/src/utils/postgresConnection.ts +++ b/src/utils/postgresConnection.ts @@ -5,16 +5,17 @@ export const client = new Client({ host: process.env.POSTGRES_HOST, database: process.env.POSTGRES_DATABASE, password: process.env.POSTGRES_PASSWORD, - port: 5432, + port: parseInt(process.env.POSTGRES_PORT || '5433', 10), + ssl: process.env.POSTGRES_SSL === 'true' ? { rejectUnauthorized: false } : undefined, }); export const connectDB = async () => { try { await client.connect(); logger.info('Database connected successfully'); } catch (error) { - logger.error('Database connection error:', error); + logger.error({ err: error }, 'Database connection error'); throw new Error('Database connection error'); } }; connectDB() -module.exports = { client } \ No newline at end of file +module.exports = { client } From 4ad253904765870cdbdab5b62bc56d7e59103a78 Mon Sep 17 00:00:00 2001 From: gohilamariappan <41056032+gohilamariappan@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:36:28 +0530 Subject: [PATCH 2/5] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c4ec10b..a9126ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18 +FROM node:20 WORKDIR /usr/src/app COPY . . RUN yarn install From 6d002762d9872a5f326c5c28be527d04766c25f5 Mon Sep 17 00:00:00 2001 From: gohilamariappan <41056032+gohilamariappan@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:36:41 +0530 Subject: [PATCH 3/5] Update Dockerfile.build --- Dockerfile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.build b/Dockerfile.build index 3c13437..1e9a5e2 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,4 +1,4 @@ -FROM node:18 +FROM node:20 WORKDIR /usr/src/app COPY . . RUN yarn install From 50619ec15ccbe4b44cbebd745438a3f4b787530b Mon Sep 17 00:00:00 2001 From: gohilamariappan <41056032+gohilamariappan@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:37:48 +0530 Subject: [PATCH 4/5] Update Dockerfile.build --- Dockerfile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.build b/Dockerfile.build index 1e9a5e2..ca25f21 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,4 +1,4 @@ -FROM node:20 +FROM node:22 WORKDIR /usr/src/app COPY . . RUN yarn install From df3efee94e843a2d379d85b8e042a076919d24d8 Mon Sep 17 00:00:00 2001 From: gohilamariappan <41056032+gohilamariappan@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:38:07 +0530 Subject: [PATCH 5/5] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9126ec..f333ef9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20 +FROM node:22 WORKDIR /usr/src/app COPY . . RUN yarn install