mirror of
https://github.com/docmost/docmost.git
synced 2026-05-17 23:14:07 +08:00
@@ -148,6 +148,22 @@ export class EnvironmentVariables {
|
||||
@ValidateIf((obj) => obj.AI_DRIVER && obj.AI_DRIVER === 'ollama')
|
||||
@IsUrl({ protocols: ['http', 'https'], require_tld: false })
|
||||
OLLAMA_API_URL: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['postgres', 'clickhouse'])
|
||||
@IsString()
|
||||
EVENT_STORE_DRIVER: string;
|
||||
|
||||
@ValidateIf((obj) => obj.EVENT_STORE_DRIVER === 'clickhouse')
|
||||
@IsNotEmpty()
|
||||
@IsUrl(
|
||||
{ protocols: ['http', 'https'], require_tld: false },
|
||||
{
|
||||
message:
|
||||
'CLICKHOUSE_URL must be a valid URL e.g http://user:password@localhost:8123/docmost',
|
||||
},
|
||||
)
|
||||
CLICKHOUSE_URL: string;
|
||||
}
|
||||
|
||||
export function validate(config: Record<string, any>) {
|
||||
|
||||
Reference in New Issue
Block a user