From 10aaea4d39736e49c9ba3e766ef2f209a2dc765d Mon Sep 17 00:00:00 2001 From: Dieter Stinglhamber Date: Thu, 8 Sep 2022 08:49:21 +0200 Subject: [PATCH] add connection pool settings --- .../resources/templates/database-templates/js/database.template | 2 ++ .../resources/templates/database-templates/ts/database.template | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/generators/app/lib/resources/templates/database-templates/js/database.template b/packages/generators/app/lib/resources/templates/database-templates/js/database.template index f32bff111a..b6de3768a8 100644 --- a/packages/generators/app/lib/resources/templates/database-templates/js/database.template +++ b/packages/generators/app/lib/resources/templates/database-templates/js/database.template @@ -24,6 +24,7 @@ module.exports = ({ env }) => { ), }, }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, }, postgres: { connection: { @@ -46,6 +47,7 @@ module.exports = ({ env }) => { }, schema: env('DATABASE_SCHEMA', 'public'), }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, }, sqlite: { connection: { diff --git a/packages/generators/app/lib/resources/templates/database-templates/ts/database.template b/packages/generators/app/lib/resources/templates/database-templates/ts/database.template index 094c1e0afd..8421b765ec 100644 --- a/packages/generators/app/lib/resources/templates/database-templates/ts/database.template +++ b/packages/generators/app/lib/resources/templates/database-templates/ts/database.template @@ -24,6 +24,7 @@ export default = ({ env }) => { ), }, }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, }, postgres: { connection: { @@ -46,6 +47,7 @@ export default = ({ env }) => { }, schema: env('DATABASE_SCHEMA', 'public'), }, + pool: { min: env.int('DATABASE_POOL_MIN', 2), max: env.int('DATABASE_POOL_MAX', 10) }, }, sqlite: { connection: {