diff --git a/www/immich/Makefile b/www/immich/Makefile index 3cb77d85ba08..d1630c355aec 100644 --- a/www/immich/Makefile +++ b/www/immich/Makefile @@ -1,123 +1,123 @@ PORTNAME= immich DISTVERSIONPREFIX= v DISTVERSION= 3.2.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www MASTER_SITES= https://github.com/joneum/FreeBSD-Immich/releases/download/v${DISTVERSION}/:buildkit DISTFILES= immich-freebsd-buildkit-${DISTVERSION}${EXTRACT_SUFX}:buildkit MAINTAINER= joneum@FreeBSD.org COMMENT= High performance self-hosted photo and video management solution WWW= https://immich.app/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 ONLY_FOR_ARCHS_REASON= native Node.js modules are only tested on \ 64-bit platforms BUILD_DEPENDS= ${LOCALBASE}/bin/npm:www/npm-node22 LIB_DEPENDS= libheif.so:graphics/libheif \ libraw.so:graphics/libraw \ libvips.so:graphics/vips RUN_DEPENDS= ${LOCALBASE}/bin/gzip:archivers/gzip \ exiftool:graphics/p5-Image-ExifTool \ ffmpeg:multimedia/ffmpeg USES= cpe gettext-runtime gmake gnome nodejs:22,build,run pgsql:14+ \ pkgconfig python:build CPE_VENDOR= futo WANT_PGSQL= client USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= immich-app USE_RC_SUBR= immich_server # The buildkit distfile carries the pnpm store, the pnpm tarball, the # geodata and the core plugin, so that the build needs no network. It is # made by unpacking the release tarball and running, with the pnpm version # from packageManager in package.json: # pnpm install --frozen-lockfile --ignore-scripts --store-dir /pnpm-store # cd && npm pack pnpm@ # plus the geodata files from geonames.org and natural-earth-vector, and # the immich-plugin-core payload from the upstream container image. BUILDKIT= ${WRKDIR}/immich-freebsd-buildkit-${DISTVERSION} PNPM= ${WRKDIR}/pnpm-prefix/bin/pnpm PNPM_VERSION= 11.22.0 MAKE_ENV= CI=1 \ COREPACK_ENABLE_STRICT=0 \ NODE_OPTIONS=--max-old-space-size=4096 \ npm_config_build_from_source=true \ npm_config_nodedir=${LOCALBASE} \ npm_config_python=${PYTHON_CMD} \ PYTHON=${PYTHON_CMD} \ SHARP_FORCE_GLOBAL_LIBVIPS=1 SUB_FILES= pkg-message SUB_LIST= NODE=${LOCALBASE}/bin/node USERS= immich GROUPS= immich post-patch: @${REINPLACE_CMD} -e 's|/usr/lib/postgresql/[^/]*/bin/|${LOCALBASE}/bin/|' \ ${WRKSRC}/server/src/services/database-backup.service.ts pre-build: cd ${WRKDIR} && ${SETENV} PATH=${PATH} \ npm install -g --prefix ${WRKDIR}/pnpm-prefix \ ${BUILDKIT}/pnpm-${PNPM_VERSION}.tgz do-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${PNPM} install --offline --frozen-lockfile \ --store-dir ${BUILDKIT}/pnpm-store cd $$(${ECHO_CMD} ${WRKSRC}/node_modules/.pnpm/sharp@*/node_modules/sharp) && \ ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/node install/build.js cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${PNPM} --filter @immich/plugin-sdk --filter @immich/sdk \ --filter immich build cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${PNPM} --filter immich-web build cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ ${PNPM} --store-dir ${BUILDKIT}/pnpm-store --filter immich \ --prod --no-optional deploy ${WRKDIR}/server-pruned cd $$(${ECHO_CMD} ${WRKDIR}/server-pruned/node_modules/.pnpm/sharp@*/node_modules/sharp) && \ ${SETENV} ${MAKE_ENV} ${LOCALBASE}/bin/node install/build.js do-install: ${INSTALL_DATA} ${FILESDIR}/immich.env.sample ${STAGEDIR}${PREFIX}/etc/ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d ${INSTALL_DATA} ${FILESDIR}/newsyslog-immich.conf \ ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/immich.conf ${MKDIR} ${STAGEDIR}${WWWDIR}/server \ ${STAGEDIR}${WWWDIR}/build-data/www \ ${STAGEDIR}${WWWDIR}/build-data/geodata \ ${STAGEDIR}${WWWDIR}/build-data/plugins/immich-plugin-core cd ${WRKDIR}/server-pruned && ${PAX} -rw . ${STAGEDIR}${WWWDIR}/server cd ${WRKSRC}/web/build && ${PAX} -rw . ${STAGEDIR}${WWWDIR}/build-data/www cd ${BUILDKIT}/geodata && ${PAX} -rw . ${STAGEDIR}${WWWDIR}/build-data/geodata cd ${BUILDKIT}/plugins/immich-plugin-core && ${PAX} -rw . \ ${STAGEDIR}${WWWDIR}/build-data/plugins/immich-plugin-core ${MKDIR} ${STAGEDIR}/var/db/immich ${STAGEDIR}/var/log/immich post-install: @${FIND} ${STAGEDIR}${WWWDIR}/server/node_modules -type f \ \( -name "*.sh" -o -name "*.py" -o -name build_tag_lookup \ -o -name validate \) -exec ${CHMOD} a-x {} + @${FIND} ${STAGEDIR}${WWWDIR}/server -type d \ \( -name .tmp -o -name .deps -o -name nothing \) \ -exec ${RM} -r {} + 2>/dev/null || ${TRUE} @${FIND} ${STAGEDIR}${WWWDIR}/server -type f \ \( -name "*.map" -o -name "*.d.ts" \) -delete @${FIND} ${STAGEDIR}${WWWDIR}/server -type d \ \( -name test -o -name tests -o -name __tests__ \ -o -name coverage \) -exec ${RM} -r {} + 2>/dev/null || ${TRUE} @${FIND} ${STAGEDIR}${WWWDIR}/server -type d -empty -delete .include diff --git a/www/immich/files/patch-server_src_dtos_config.dto.ts b/www/immich/files/patch-server_src_dtos_config.dto.ts new file mode 100644 index 000000000000..608108fc1353 --- /dev/null +++ b/www/immich/files/patch-server_src_dtos_config.dto.ts @@ -0,0 +1,11 @@ +--- server/src/dtos/config.dto.ts.orig 2026-09-19 10:49:13 UTC ++++ server/src/dtos/config.dto.ts +@@ -570,7 +570,7 @@ export const defaults = Object.freeze({ + twoPass: false, + preferredHwDevice: 'auto', + transcode: TranscodePolicy.Required, +- tonemap: ToneMapping.Hable, ++ tonemap: ToneMapping.Disabled, + accel: TranscodeHardwareAcceleration.Disabled, + accelDecode: true, + realtime: { diff --git a/www/immich/files/pkg-message.in b/www/immich/files/pkg-message.in index da31959c2b3c..4f7f59c48cf1 100644 --- a/www/immich/files/pkg-message.in +++ b/www/immich/files/pkg-message.in @@ -1,75 +1,82 @@ [ { type: install message: < Settings > Machine Learning) to http://127.0.0.1:3003 Running it: * The server listens on all addresses, and its worker opens a second port on a random number as well. Both follow sysrc immich_server_host=127.0.0.1 so set that and put a reverse proxy with TLS in front of it. The same goes for www/immich-public-proxy, which faces the internet. * Back up both the database and the media directory. The built-in database backup writes to the backups folder below the media location and does not include the media itself. To restore one of those dumps into an empty database: su -l postgres -c "createdb -O immich immich" su -l postgres -c "psql -q -d immich -c 'CREATE EXTENSION vector'" su -l postgres -c "psql -q -d immich -c 'CREATE EXTENSION vchord CASCADE'" gzip -dc .sql.gz | su -l postgres -c "psql -q -d immich" The extensions have to exist before the dump is loaded. * Sizing: the service itself needs about 1 GB of disk, the machine learning models another 1 GB, and the two node processes sit at roughly 800 MB of memory when idle. Give the machine 8 GB. * Files are stored under random names unless you set a storage template in the admin interface. Doing that before the first import keeps the library readable without the database. * Logs are rotated by newsyslog through %%PREFIX%%/etc/newsyslog.conf.d/immich.conf. + * HDR tone mapping is off by default. Immich builds its filter chain + around the tonemapx filter, which ffmpeg does not have, so an HDR + video would get no thumbnail at all. The switch sits under + Administration > Settings > Video Transcoding. Turning it on needs + an ffmpeg that provides tonemapx, and its path belongs into + FFMPEG_PATH and FFPROBE_PATH in immich.env. Existing installations + keep whatever is stored in their database. * Schema migrations run automatically on start, so take a backup before a version upgrade; downgrades are not supported. After a PostgreSQL major upgrade, rebuild pgvector and vchord. After a Node major upgrade, rebuild this port so the native modules match. The web interface listens on port 2283 by default. The upload location defaults to /var/db/immich and can be changed with sysrc immich_server_media_location=/path. EOM } ]