feat: change default media location to /data (#20367)

* feat!: change default media location to /data

* feat: dynamically detect media location
This commit is contained in:
Jason Rasmussen
2025-07-29 16:58:50 -04:00
committed by GitHub
parent 4cae15f28d
commit 58521c9efb
39 changed files with 316 additions and 209 deletions

View File

@@ -97,6 +97,7 @@ export interface EnvData {
storage: {
ignoreMountCheckErrors: boolean;
mediaLocation?: string;
};
workers: ImmichWorker[];
@@ -307,6 +308,7 @@ const getEnv = (): EnvData => {
storage: {
ignoreMountCheckErrors: !!dto.IMMICH_IGNORE_MOUNT_CHECK_ERRORS,
mediaLocation: dto.IMMICH_MEDIA_LOCATION,
},
telemetry: {

View File

@@ -162,6 +162,10 @@ export class StorageRepository {
}
}
existsSync(filepath: string) {
return existsSync(filepath);
}
async checkDiskUsage(folder: string): Promise<DiskUsage> {
const stats = await fs.statfs(folder);
return {