From a538be42ec8aa50e96e595057692b7df4b6a7b1e Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Sat, 17 Aug 2024 17:44:04 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20ai=20simulation=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Ruck --- bundestag.io/admin/.dockerignore | 3 ++- bundestag.io/admin/src/lib/config.ts | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bundestag.io/admin/.dockerignore b/bundestag.io/admin/.dockerignore index 33c14598..7797aa64 100644 --- a/bundestag.io/admin/.dockerignore +++ b/bundestag.io/admin/.dockerignore @@ -1,7 +1,8 @@ .git node_modules logs -.env* +.env +.env.example .next *.log .turbo diff --git a/bundestag.io/admin/src/lib/config.ts b/bundestag.io/admin/src/lib/config.ts index 258fed21..f2f5bdaa 100644 --- a/bundestag.io/admin/src/lib/config.ts +++ b/bundestag.io/admin/src/lib/config.ts @@ -1,3 +1,5 @@ +import { log } from './logger'; + const errors: string[] = []; const AI_SIMULATION = process.env.AI_SIMULATION === 'true'; @@ -15,6 +17,11 @@ if (errors.length > 0) { throw new Error(errors.join('\n')); } +if (AI_SIMULATION) { + log.info('AI_SIMULATION is enabled'); + log.debug(`AI_SIMULATION is set to ${AI_SIMULATION}`); +} + export const config = { BUNDESTAGIO_SERVER_URL: process.env.BUNDESTAGIO_SERVER_URL!, AI_SERVER_URL: process.env.AI_SERVER_URL,