mirror of
https://github.com/immich-app/immich.git
synced 2025-12-28 17:24:56 +03:00
* basic changes update version check set ef_search for clip * pgvector compatibility Revert "pgvector compatibility" This reverts commit 2b66a52aa4097dd27da58138c5288fd87cb9b24a. pgvector compatibility: minimal edition pgvector startup check * update extension at startup * wording shortened vector extension variable name * nightly docker * fixed version checks * update tests add tests for updating extension remove unnecessary check * simplify `getRuntimeConfig` * wording * reindex on minor version update * 0.2 upgrade testing update prod compose * acquire lock for init * wip vector down on shutdown * use upgrade helper * update image tag * refine restart check check error message * test reindex testing upstream fix formatting fixed reindexing * use enum in signature * fix tests remove unused code * add reindexing tests * update to official 0.2 remove alpha from version name * add warning test if restart required * update test image to 0.2.0 * linting and test cleanup * formatting * update sql * wording * handle setting search path for new and existing databases * handle new db in reindex check * fix post-update reindexing * get dim size * formatting * use vbase * handle different db name * update sql * linting * fix suggested env
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
// TODO: remove nestjs references from domain
|
|
import { LogLevel } from '@app/infra/entities';
|
|
import { ConfigModuleOptions } from '@nestjs/config';
|
|
import Joi from 'joi';
|
|
|
|
const WHEN_DB_URL_SET = Joi.when('DB_URL', {
|
|
is: Joi.exist(),
|
|
then: Joi.string().optional(),
|
|
otherwise: Joi.string().required(),
|
|
});
|
|
|
|
export const immichAppConfig: ConfigModuleOptions = {
|
|
envFilePath: '.env',
|
|
isGlobal: true,
|
|
validationSchema: Joi.object({
|
|
NODE_ENV: Joi.string().optional().valid('development', 'production', 'staging').default('development'),
|
|
DB_USERNAME: WHEN_DB_URL_SET,
|
|
DB_PASSWORD: WHEN_DB_URL_SET,
|
|
DB_DATABASE_NAME: WHEN_DB_URL_SET,
|
|
DB_URL: Joi.string().optional(),
|
|
LOG_LEVEL: Joi.string()
|
|
.optional()
|
|
.valid(...Object.values(LogLevel)),
|
|
MACHINE_LEARNING_PORT: Joi.number().optional(),
|
|
MICROSERVICES_PORT: Joi.number().optional(),
|
|
SERVER_PORT: Joi.number().optional(),
|
|
VECTOR_EXTENSION: Joi.string().optional().valid('pgvector', 'pgvecto.rs').default('pgvecto.rs'),
|
|
}),
|
|
};
|