From 961b1c1956a1de45db9faf5f0888ba7224520fc9 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 27 Nov 2023 16:47:56 +0100 Subject: [PATCH] Introduce TYPEORM_EXTRA env variable (#770) Co-authored-by: Florent FAYOLLE --- README.md | 3 ++- app/server/lib/dbUtils.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c2bbca8b..5118c49a 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ etc. Grist Labs is an open-core company. We offer Grist hosting as a service, with free and paid plans. We also develop and sell features related to Grist using a proprietary license, targeted at the -needs of enterprises with large self-managed installations. +needs of enterprises with large self-managed installations. We see data portability and autonomy as a key value, and `grist-core` is an essential part of that. We are committed to maintaining and improving the `grist-core` codebase, and to be thoughtful about how proprietary offerings impact data portability and autonomy. @@ -396,6 +396,7 @@ TYPEORM_PASSWORD | password to use TYPEORM_PORT | port number for db if not the default for that db type TYPEORM_TYPE | set to 'sqlite' or 'postgres' TYPEORM_USERNAME | username to connect as +TYPEORM_EXTRA | any other properties to pass to TypeORM in JSON format #### Testing: diff --git a/app/server/lib/dbUtils.ts b/app/server/lib/dbUtils.ts index ec095dc3..4a823640 100644 --- a/app/server/lib/dbUtils.ts +++ b/app/server/lib/dbUtils.ts @@ -142,6 +142,7 @@ export function getTypeORMSettings(): DataSourceOptions { "subscribers": [ `${codeRoot}/app/gen-server/subscriber/*.js` ], + ...JSON.parse(process.env.TYPEORM_EXTRA || "{}"), ...cache, }; }