diff --git a/scripts/_common.sh b/scripts/_common.sh index 7c2281f..46cf29b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,25 @@ # COMMON VARIABLES #================================================= -PHOTOPRISM_VERSION="220730-bullseye" +function detect_arch() { + case "$YNH_ARCH" in + "amd64") + PHOTOPRISM_VERSION="sha256:2a2fc58d5bf77642424854158a06713ce532026bd18a43e07fd71d75365cb8d3" + ;; + + "arm64") + PHOTOPRISM_VERSION="sha256:ad6de95e77e90a64487085b55dbdbea21c04aff5a17ca3c8790d1deae19b9ee1" + ;; + + "armhf") + PHOTOPRISM_VERSION="sha256:4e0b39a06e0f7ecd11aa8cbd84c739cba3417c99348f52e3433cdeaeeb5474cb" + ;; + + *) + ynh_die --message="Your server architecture ($YNH_ARCH) is not supported." + ;; + esac +} #pkg_dependencies="libc6-dev libssl-dev libxft-dev libhdf5-serial-dev libpng-dev libheif-examples librsvg2-bin libx264-dev libx265-dev libnss3 libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev libzmq3-dev" pkg_dependencies="" diff --git a/scripts/install b/scripts/install index 3d7d147..fd535ac 100755 --- a/scripts/install +++ b/scripts/install @@ -124,6 +124,7 @@ ynh_script_progression --message="Making install..." # Install photoprism pushd $final_path/build + detect_arch ./docker-image-extract photoprism/photoprism:$PHOTOPRISM_VERSION popd mkdir -p "$final_path/live/" diff --git a/scripts/upgrade b/scripts/upgrade index d50ebd9..f9c718f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,6 +120,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then # Install photoprism pushd $final_path/build + detect_arch ./docker-image-extract photoprism/photoprism:$PHOTOPRISM_VERSION popd mkdir -p "$final_path/live/"