2024-09-27 16:28:56 +02:00
|
|
|
import { Injectable } from '@nestjs/common';
|
|
|
|
import { getVectorExtension } from 'src/database.config';
|
|
|
|
import { EnvData, IConfigRepository } from 'src/interfaces/config.interface';
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class ConfigRepository implements IConfigRepository {
|
|
|
|
getEnv(): EnvData {
|
|
|
|
return {
|
2024-10-01 22:03:55 +02:00
|
|
|
configFile: process.env.IMMICH_CONFIG_FILE,
|
2024-09-27 16:28:56 +02:00
|
|
|
database: {
|
|
|
|
skipMigrations: process.env.DB_SKIP_MIGRATIONS === 'true',
|
|
|
|
vectorExtension: getVectorExtension(),
|
|
|
|
},
|
2024-10-01 19:04:37 +02:00
|
|
|
storage: {
|
|
|
|
ignoreMountCheckErrors: process.env.IMMICH_IGNORE_MOUNT_CHECK_ERRORS === 'true',
|
|
|
|
},
|
2024-09-27 16:28:56 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|