From a7ad9b752b34e934deb9fd4422ea6dfbcc74bdf7 Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Mon, 6 Jan 2025 20:10:59 +0000 Subject: [PATCH] feat: fix Clickhouse configuration to use default port if not specified --- Common/Server/Infrastructure/ClickhouseConfig.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/Server/Infrastructure/ClickhouseConfig.ts b/Common/Server/Infrastructure/ClickhouseConfig.ts index 2fbc4e0f0ad..431e8f4c514 100644 --- a/Common/Server/Infrastructure/ClickhouseConfig.ts +++ b/Common/Server/Infrastructure/ClickhouseConfig.ts @@ -18,9 +18,10 @@ export type ClickHouseClientConfigOptions = NodeClickHouseClientConfigOptions; const hostProtocol: string = ClickHouseIsHostHttps ? "https" : "http"; const clickhouseHost: Hostname = ClickhouseHost || new Hostname("clickhouse"); +const clickhousePort: string = (ClickhousePort || 8123).toString(); const options: ClickHouseClientConfigOptions = { - url: `${hostProtocol}://${clickhouseHost.toString()}:${ClickhousePort.toNumber()}`, + url: `${hostProtocol}://${clickhouseHost.toString()}:${clickhousePort}`, username: ClickhouseUsername, password: ClickhousePassword, database: ClickhouseDatabase,