mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore: update to node 18 and alpine 3.17 (#2430)
* chore: update to node 18 and alpine 3.17 Signed-off-by: martin <martin.labat92@gmail.com> * chore: fix sharp version Signed-off-by: martin <martin.labat92@gmail.com> * chore(server): use vips-dev Signed-off-by: martin <martin.labat92@gmail.com> * update checkDiskUsage Signed-off-by: martin <martin.labat92@gmail.com> * fix: use vips-heif instead of libheif Signed-off-by: martin <martin.labat92@gmail.com> * fix: use vips instead of vips-cpp Signed-off-by: martin <martin.labat92@gmail.com> * fix: ensure vips installation Signed-off-by: martin <martin.labat92@gmail.com> --------- Signed-off-by: martin <martin.labat92@gmail.com>
This commit is contained in:
parent
c7c0ef6abc
commit
70a0f4ae48
5 changed files with 5100 additions and 4672 deletions
|
|
@ -3,7 +3,6 @@ import { constants, createReadStream, existsSync, mkdirSync } from 'fs';
|
|||
import fs from 'fs/promises';
|
||||
import mv from 'mv';
|
||||
import { promisify } from 'node:util';
|
||||
import diskUsage from 'diskusage';
|
||||
import path from 'path';
|
||||
|
||||
const moveFile = promisify<string, string, mv.Options>(mv);
|
||||
|
|
@ -68,7 +67,12 @@ export class FilesystemProvider implements IStorageRepository {
|
|||
}
|
||||
}
|
||||
|
||||
checkDiskUsage(folder: string): Promise<DiskUsage> {
|
||||
return diskUsage.check(folder);
|
||||
async checkDiskUsage(folder: string): Promise<DiskUsage> {
|
||||
const stats = await fs.statfs(folder);
|
||||
return {
|
||||
available: stats.bavail * stats.bsize,
|
||||
free: stats.bfree * stats.bsize,
|
||||
total: stats.blocks * stats.bsize,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue