From 8b89fb0b52fd116ce5162843dedde7d04634aa9e Mon Sep 17 00:00:00 2001 From: vhsdream Date: Sat, 24 May 2025 09:44:57 -0400 Subject: [PATCH] Immich: increase disk resource; add logic for determining upload location change - Increasing disk resources to 20GB - Adding 'IMMICH_MEDIA_LOCATION' env var to .env - edit this to change Immich upload location - Read IMMICH_MEDIA_LOCATION from env during update for dynamic symlinks --- ct/immich.sh | 4 ++-- frontend/public/json/immich.json | 6 +++++- install/immich-install.sh | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ct/immich.sh b/ct/immich.sh index 9512b4a..e917a12 100644 --- a/ct/immich.sh +++ b/ct/immich.sh @@ -7,7 +7,7 @@ source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/ APP="immich" var_tags="${var_tags:-photos}" -var_disk="${var_disk:-16}" +var_disk="${var_disk:-20}" var_cpu="${var_cpu:-4}" var_ram="${var_ram:-4096}" var_os="${var_os:-debian}" @@ -219,7 +219,7 @@ EOF msg_ok "Database upgrade complete" fi INSTALL_DIR="/opt/${APP}" - UPLOAD_DIR="${INSTALL_DIR}/upload" + UPLOAD_DIR="$(sed -n '/IMMICH_MEDIA_LOCATION/s/[^=]*=//p' /opt/immich/.env)" SRC_DIR="${INSTALL_DIR}/source" APP_DIR="${INSTALL_DIR}/app" ML_DIR="${APP_DIR}/machine-learning" diff --git a/frontend/public/json/immich.json b/frontend/public/json/immich.json index 666b2f9..550b171 100644 --- a/frontend/public/json/immich.json +++ b/frontend/public/json/immich.json @@ -21,7 +21,7 @@ "resources": { "cpu": 4, "ram": 4096, - "hdd": 16, + "hdd": 20, "os": "Debian", "version": "12" } @@ -39,6 +39,10 @@ { "text": "If using OpenVINO HW machine-learning, increase RAM because OpenVINO is memory-intensive", "type": "info" + }, + { + "text": "To change upload location, edit 'IMMICH_MEDIA_LOCATION' in `/opt/immich/.env`", + "type": "info" } ] } diff --git a/install/immich-install.sh b/install/immich-install.sh index 1de9950..31a5922 100644 --- a/install/immich-install.sh +++ b/install/immich-install.sh @@ -385,6 +385,8 @@ DB_VECTOR_EXTENSION=vectorchord REDIS_HOSTNAME=127.0.0.1 IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003 MACHINE_LEARNING_CACHE_FOLDER=${INSTALL_DIR}/cache + +IMMICH_MEDIA_LOCATION=${UPLOAD_DIR} EOF cat <"${ML_DIR}"/ml_start.sh #!/usr/bin/env bash