From 229995b8dba020ff94d72e3f18ec1855bab4a87b Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 9 Jun 2022 23:32:11 +0700 Subject: [PATCH 01/29] Bump version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7173a9f..fd25d80 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "AI-Powered Photos App for the Decentralized Web", "fr": "Gestion de photos en ligne" }, - "version": "2022.28.05~ynh1", + "version": "2022.28.05~ynh2", "url": "photoprism.app", "upstream": { "license": "AGPL-3.0-only", From ff280ffecc603ded798c1cbe7564bd6f623248de Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 9 Jun 2022 23:33:06 +0700 Subject: [PATCH 02/29] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c1c40be..cdaf76e 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=512 + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From eca3623baf30bf7a9192bc0ef84836c5b9961fd9 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 12 Jun 2022 14:20:25 +0700 Subject: [PATCH 03/29] Fix assets is existing --- scripts/install | 5 ++--- scripts/restore | 9 ++------- scripts/upgrade | 9 ++++----- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index cdaf76e..8d39702 100755 --- a/scripts/install +++ b/scripts/install @@ -163,9 +163,8 @@ ynh_script_progression --message="Creating a data directory..." --time --weight= datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir -mkdir -p $datadir -mkdir "$datadir/assets/" -mv "$final_path/build/assets/"* "$datadir/assets/" +mkdir -p "$datadir/assets/" +mv -f "$final_path/build/assets/"* "$datadir/assets/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" diff --git a/scripts/restore b/scripts/restore index c34fa67..ce0ee28 100755 --- a/scripts/restore +++ b/scripts/restore @@ -84,14 +84,9 @@ ynh_script_progression --message="Restoring the data directory..." --time --weig ynh_restore_file --origin_path="$datadir" --not_mandatory -mkdir -p $datadir +mkdir -p "$datadir/assets/" +mv -f "$final_path/build/assets/"* "$datadir/assets/" -# FIXME: this should be managed by the core in the future -# Here, as a packager, you may have to tweak the ownerhsip/permissions -# such that the appropriate users (e.g. maybe www-data) can access -# files in some cases. -# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder - -# this will be treated as a security issue. chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" diff --git a/scripts/upgrade b/scripts/upgrade index 639a28d..543153c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -121,8 +121,9 @@ pushd "$final_path" # Setup node environment export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source - ynh_secure_remove --file="$final_path/build" - make all install DESTDIR=$final_path/build 2>&1 + ynh_use_nodejs + env "$ynh_node_load_PATH" npm install -g npm + env "$ynh_node_load_PATH" make dep-tensorflow dep-js dep-go build-js install DESTDIR=$final_path/build 2>&1 ynh_secure_remove --file="$final_path/go" popd @@ -131,9 +132,7 @@ popd #================================================= ynh_script_progression --message="Updating data directory..." --time --weight=1 -ynh_secure_remove --file="$datadir/assets" -mkdir "$datadir/assets/" -mv "$final_path/build/assets/"* "$datadir/assets/" +mv -f "$final_path/build/assets/"* "$datadir/assets/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" From dfb7e59cd5c314050f02e528c1031f3e9b804faa Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 12 Jun 2022 15:33:02 +0700 Subject: [PATCH 04/29] Use rsync instead of mv --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 8d39702..e2950a2 100755 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,7 @@ datadir=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=datadir --value=$datadir mkdir -p "$datadir/assets/" -mv -f "$final_path/build/assets/"* "$datadir/assets/" +rsync -a "$final_path/build/assets/" "$datadir/assets/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" diff --git a/scripts/restore b/scripts/restore index ce0ee28..8efff2d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -85,7 +85,7 @@ ynh_script_progression --message="Restoring the data directory..." --time --weig ynh_restore_file --origin_path="$datadir" --not_mandatory mkdir -p "$datadir/assets/" -mv -f "$final_path/build/assets/"* "$datadir/assets/" +rsync -a "$final_path/build/assets/" "$datadir/assets/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" diff --git a/scripts/upgrade b/scripts/upgrade index 543153c..247b1f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,7 +132,7 @@ popd #================================================= ynh_script_progression --message="Updating data directory..." --time --weight=1 -mv -f "$final_path/build/assets/"* "$datadir/assets/" +rsync -a "$final_path/build/assets/" "$datadir/assets/" chmod 750 "$datadir" chmod -R o-rwx "$datadir" From 5ba9b17cbef17a42fd383510ce3bde93ddfcfabd Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 12 Jun 2022 15:51:06 +0700 Subject: [PATCH 05/29] Update backup --- scripts/backup | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/backup b/scripts/backup index 99c594d..c7a65b1 100755 --- a/scripts/backup +++ b/scripts/backup @@ -76,14 +76,6 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - -ynh_backup --src_path="/etc/cron.d/$app" - -ynh_backup --src_path="/etc/$app/" - #================================================= # BACKUP THE MYSQL DATABASE #================================================= From 7891696caea16d77a474f14726924f55a39c187a Mon Sep 17 00:00:00 2001 From: Limezy Date: Sun, 12 Jun 2022 16:08:04 +0700 Subject: [PATCH 06/29] Max old space to 800 --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e2950a2..a852e73 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=1024 + export NODE_OPTIONS=--max_old_space_size=800 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/upgrade b/scripts/upgrade index 247b1f8..afc4331 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=1024 + export NODE_OPTIONS=--max_old_space_size=800 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From c535ec2b76c4892944a9f8e10ee27adf656fe26b Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 13 Jun 2022 08:02:05 +0700 Subject: [PATCH 07/29] Max old space 1024 --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a852e73..e2950a2 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=800 + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/upgrade b/scripts/upgrade index afc4331..247b1f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=800 + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From f8bcb829b075ffdaf90869f66b1328a347d3135b Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 13 Jun 2022 11:31:38 +0700 Subject: [PATCH 08/29] Update restore --- scripts/restore | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/restore b/scripts/restore index 8efff2d..56bc969 100755 --- a/scripts/restore +++ b/scripts/restore @@ -110,15 +110,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql -#================================================= -# RESTORE VARIOUS FILES -#================================================= -ynh_script_progression --message="Restoring various files..." --time --weight=1 - -ynh_restore_file --origin_path="/etc/cron.d/$app" - -ynh_restore_file --origin_path="/etc/$app/" - #================================================= # RESTORE SYSTEMD #================================================= From cf7d3567815935aa1019187ee086b08d3e6b2aa1 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 14:12:15 +0700 Subject: [PATCH 09/29] Test --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e2950a2..e7cb3e4 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=1024 + export NODE_OPTIONS=--max_old_space_size=512 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/upgrade b/scripts/upgrade index 247b1f8..0db25ce 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=1024 + export NODE_OPTIONS=--max_old_space_size=512 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From b5568eeb5e2e2fb9b5be103a00e349d8b9106b38 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 14:20:09 +0700 Subject: [PATCH 10/29] Test --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e7cb3e4..a852e73 100755 --- a/scripts/install +++ b/scripts/install @@ -147,7 +147,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=512 + export NODE_OPTIONS=--max_old_space_size=800 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/upgrade b/scripts/upgrade index 0db25ce..afc4331 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=512 + export NODE_OPTIONS=--max_old_space_size=800 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From 8d7d47ef07ddacd1a18fb2a7c547d98b58126b47 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 14:40:10 +0700 Subject: [PATCH 11/29] Trying with swap --- scripts/_common.sh | 1 + scripts/install | 18 +++++++++++++++++- scripts/remove | 3 +++ scripts/upgrade | 18 +++++++++++++++++- scripts/ynh_add_swap | 1 - 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 061b880..cf42455 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,6 +7,7 @@ # Tag name of the installed version PHOTOPRISM_VERSION="220528-efb5d710" +MEMORY_NEEDED="2560" NODEJS_VERSION=14 GO_VERSION="1.18" diff --git a/scripts/install b/scripts/install index a852e73..2985f9e 100755 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,22 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION 2>&1 # Install go ynh_exec_warn_less ynh_install_go --go_version=$GO_VERSION +#================================================= +# ADD SWAP IF NEEDED +#================================================= +ynh_script_progression --message="Adding swap is needed..." + +total_memory=$(ynh_get_ram --total) +swap_needed=0 + +if [ $total_memory -lt $MEMORY_NEEDED ]; then + # Need a minimum of 2.5Go of memory + swap_needed=$(($MEMORY_NEEDED - $total_memory)) +fi + +ynh_script_progression --message="Adding $swap_needed Mo to swap..." +ynh_add_swap --size=$swap_needed + #================================================= # CREATE DEDICATED USER #================================================= @@ -147,7 +163,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=800 + export NODE_OPTIONS=--max_old_space_size=2048 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/remove b/scripts/remove index b4c79e2..999f187 100755 --- a/scripts/remove +++ b/scripts/remove @@ -118,6 +118,9 @@ ynh_secure_remove --file="/etc/cron.d/$app" # Remove the log files ynh_secure_remove --file="/var/log/$app" +# Remove swap +ynh_del_swap + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index afc4331..afa7760 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,6 +104,22 @@ ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# ADD SWAP IF NEEDED +#================================================= +ynh_script_progression --message="Adding swap is needed..." + +total_memory=$(ynh_get_ram --total) +swap_needed=0 + +if [ $total_memory -lt $MEMORY_NEEDED ]; then + # Need a minimum of 2.5Go of memory + swap_needed=$(($MEMORY_NEEDED - $total_memory)) +fi + +ynh_script_progression --message="Adding $swap_needed Mo to swap..." +ynh_add_swap --size=$swap_needed + #================================================= # BUILD PHOTOPRISM @@ -119,7 +135,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=800 + export NODE_OPTIONS=--max_old_space_size=2048 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/ynh_add_swap b/scripts/ynh_add_swap index 83e11f5..2fd2d8c 100644 --- a/scripts/ynh_add_swap +++ b/scripts/ynh_add_swap @@ -51,7 +51,6 @@ ynh_add_swap () { # Preallocate space for the swap file, fallocate may sometime not be used, use dd instead in this case if ! fallocate -l ${swap_size}K /swap_$app then - echo "I'm also in !" dd if=/dev/zero of=/swap_$app bs=1024 count=${swap_size} fi chmod 0600 /swap_$app From a4fa31644be1a8e452ed5a983b6db11ae1250f6b Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 14:42:56 +0700 Subject: [PATCH 12/29] Source --- scripts/install | 1 + scripts/remove | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 2985f9e..5056d56 100755 --- a/scripts/install +++ b/scripts/install @@ -8,6 +8,7 @@ source _common.sh source ynh_install_go +source ynh_add_swap source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/remove b/scripts/remove index 999f187..a9be8ec 100755 --- a/scripts/remove +++ b/scripts/remove @@ -7,6 +7,7 @@ #================================================= source _common.sh +source ynh_add_swap source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index afa7760..c6c7a49 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,6 +8,7 @@ source _common.sh source ynh_install_go +source ynh_add_swap source /usr/share/yunohost/helpers #================================================= From 292b448f8aeacb26643fea3b131f4c317a6f7edb Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 14:56:20 +0700 Subject: [PATCH 13/29] Swap --- scripts/_common.sh | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index cf42455..7433624 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,7 +7,7 @@ # Tag name of the installed version PHOTOPRISM_VERSION="220528-efb5d710" -MEMORY_NEEDED="2560" +MEMORY_NEEDED="3000" NODEJS_VERSION=14 GO_VERSION="1.18" diff --git a/scripts/install b/scripts/install index 5056d56..74d0be3 100755 --- a/scripts/install +++ b/scripts/install @@ -164,7 +164,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=2048 + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm diff --git a/scripts/upgrade b/scripts/upgrade index c6c7a49..07a0378 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,7 +136,7 @@ pushd "$final_path" # Setup tensorflow library ./scripts/dist/install-tensorflow.sh # Setup node environment - export NODE_OPTIONS=--max_old_space_size=2048 + export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source ynh_use_nodejs env "$ynh_node_load_PATH" npm install -g npm From 81722c6eeae29520e45180c4575a7183883a3f23 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 16:08:24 +0700 Subject: [PATCH 14/29] Update restore --- scripts/restore | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/restore b/scripts/restore index 56bc969..115d9a5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -9,6 +9,7 @@ # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers +source ynh_add_swap #================================================= # MANAGE SCRIPT FAILURE @@ -101,6 +102,22 @@ ynh_script_progression --message="Reinstalling dependencies..." --time --weight= # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# ADD SWAP IF NEEDED +#================================================= +ynh_script_progression --message="Adding swap is needed..." + +total_memory=$(ynh_get_ram --total) +swap_needed=0 + +if [ $total_memory -lt $MEMORY_NEEDED ]; then + # Need a minimum of 2.5Go of memory + swap_needed=$(($MEMORY_NEEDED - $total_memory)) +fi + +ynh_script_progression --message="Adding $swap_needed Mo to swap..." +ynh_add_swap --size=$swap_needed + #================================================= # RESTORE THE MYSQL DATABASE #================================================= From 3cd7c2429f1905056c51f0851c0cac7c54b70fd3 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 23:34:17 +0700 Subject: [PATCH 15/29] Update backup --- scripts/backup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/backup b/scripts/backup index c7a65b1..ebc9b43 100755 --- a/scripts/backup +++ b/scripts/backup @@ -70,6 +70,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/logrotate.d/$app" +#================================================= +# BACKUP LOGS +#================================================= + +ynh_backup --src_path="/var/log/$app/$app.log" + #================================================= # BACKUP SYSTEMD #================================================= From 0a2d41fa3fdd910d23a6be6e7bf77d18a19e1161 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 16 Jun 2022 23:38:44 +0700 Subject: [PATCH 16/29] Add port --- scripts/remove | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/remove b/scripts/remove index a9be8ec..5b4f107 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,6 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) datadir=$(ynh_app_setting_get --app=$app --key=datadir) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # STANDARD REMOVE diff --git a/scripts/restore b/scripts/restore index 115d9a5..856bedd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,6 +35,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name datadir=$(ynh_app_setting_get --app=$app --key=datadir) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index 07a0378..f8f5343 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) language=$(ynh_app_setting_get --app=$app --key=language) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION From d54c4dfd57e15641827f4b9bb1d4734ae9120daf Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 08:51:53 +0700 Subject: [PATCH 17/29] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 856bedd..3548478 100755 --- a/scripts/restore +++ b/scripts/restore @@ -9,7 +9,7 @@ # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -source ynh_add_swap +source ../settings/scripts/ynh_add_swap #================================================= # MANAGE SCRIPT FAILURE From 7e120e712f06eebcc97c7d772862834bde02b8f7 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 10:35:02 +0700 Subject: [PATCH 18/29] Service description --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 7b541f4..33cf560 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Small description of the service +Description=AI-Powered Photos App for the Decentralized Web After=network.target [Service] From df4b463d4b59c3719a1f259bb9981665133e3d9d Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 10:39:52 +0700 Subject: [PATCH 19/29] Update restore --- scripts/restore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/restore b/scripts/restore index 3548478..6abb421 100755 --- a/scripts/restore +++ b/scripts/restore @@ -143,6 +143,13 @@ ynh_script_progression --message="Restoring the logrotate configuration..." --ti ynh_restore_file --origin_path="/etc/logrotate.d/$app" +#================================================= +# RESTORE THE LOGS +#================================================= +ynh_script_progression --message="Restoring the logs..." --weight=1 + +ynh_restore_file --origin_path="/var/log/$app/$app.log" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= From f4baa8bdb9b88bb1c55968c1230de61ff5cae410 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 11:44:38 +0700 Subject: [PATCH 20/29] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 6abb421..f5d009d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -8,8 +8,8 @@ # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh -source /usr/share/yunohost/helpers source ../settings/scripts/ynh_add_swap +source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE From f490464c246c9312819a552bb9e301b40365b770 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 11:52:36 +0700 Subject: [PATCH 21/29] Upgrade mistake --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f8f5343..cb7290e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -136,6 +136,8 @@ pushd "$final_path" export GOBIN=$GOPATH/bin # Setup tensorflow library ./scripts/dist/install-tensorflow.sh + # Remove the former build file + ynh_secure_remove --file="$final_path/build" # Setup node environment export NODE_OPTIONS=--max_old_space_size=1024 # Build server from source From 5fb74c01ef2a08fbfe878f38a1dd6ec388b7cd2e Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 16:06:55 +0700 Subject: [PATCH 22/29] Variables --- scripts/backup | 6 +++++- scripts/remove | 5 +++-- scripts/restore | 1 + scripts/upgrade | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index ebc9b43..64d60e4 100755 --- a/scripts/backup +++ b/scripts/backup @@ -28,10 +28,14 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/remove b/scripts/remove index 5b4f107..4028394 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,10 +18,11 @@ ynh_script_progression --message="Loading installation settings..." --time --wei app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) +path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) +language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/restore b/scripts/restore index f5d009d..a0249c5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,6 +34,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/upgrade b/scripts/upgrade index cb7290e..a529343 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,9 +20,11 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -language=$(ynh_app_setting_get --app=$app --key=language) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +language=$(ynh_app_setting_get --app=$app --key=language) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) #================================================= From b2fe3b1afd0d95ca89693694c25fc5eb87e04ad1 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 17:15:27 +0700 Subject: [PATCH 23/29] Db pwd --- scripts/backup | 1 + scripts/change_url | 9 ++++++--- scripts/remove | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/backup b/scripts/backup index 64d60e4..22c2778 100755 --- a/scripts/backup +++ b/scripts/backup @@ -33,6 +33,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/change_url b/scripts/change_url index 9dd70d8..6bfd7e3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,9 +30,12 @@ ynh_script_progression --message="Loading installation settings..." --time --wei final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) +db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +language=$(ynh_app_setting_get --app=$app --key=language) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) +port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP diff --git a/scripts/remove b/scripts/remove index 4028394..7d92809 100755 --- a/scripts/remove +++ b/scripts/remove @@ -22,6 +22,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/restore b/scripts/restore index a0249c5..56c5e91 100755 --- a/scripts/restore +++ b/scripts/restore @@ -34,6 +34,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/upgrade b/scripts/upgrade index a529343..1e27335 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) From 5dffe1cdfc6256c951458593dd4d58fa62c537ee Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 17:55:44 +0700 Subject: [PATCH 24/29] language_key --- scripts/backup | 2 +- scripts/change_url | 2 +- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/backup b/scripts/backup index 22c2778..3bd3843 100755 --- a/scripts/backup +++ b/scripts/backup @@ -34,7 +34,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -language=$(ynh_app_setting_get --app=$app --key=language) +language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/change_url b/scripts/change_url index 6bfd7e3..947c6f3 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -language=$(ynh_app_setting_get --app=$app --key=language) +language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/remove b/scripts/remove index 7d92809..bae2564 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -language=$(ynh_app_setting_get --app=$app --key=language) +language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/restore b/scripts/restore index 56c5e91..2b6268f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -35,7 +35,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -language=$(ynh_app_setting_get --app=$app --key=language) +language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) diff --git a/scripts/upgrade b/scripts/upgrade index 1e27335..39b60c0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,7 +24,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -language=$(ynh_app_setting_get --app=$app --key=language) +language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) From a1e59ea6607631119bf8d9888970d877381e23ac Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 17 Jun 2022 18:35:21 +0700 Subject: [PATCH 25/29] Password --- scripts/backup | 1 + scripts/change_url | 1 + scripts/install | 1 + scripts/remove | 1 + scripts/restore | 1 + scripts/upgrade | 1 + 6 files changed, 6 insertions(+) diff --git a/scripts/backup b/scripts/backup index 3bd3843..444217b 100755 --- a/scripts/backup +++ b/scripts/backup @@ -37,6 +37,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP diff --git a/scripts/change_url b/scripts/change_url index 947c6f3..2ecbf05 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -36,6 +36,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP diff --git a/scripts/install b/scripts/install index 74d0be3..72d1298 100755 --- a/scripts/install +++ b/scripts/install @@ -60,6 +60,7 @@ ynh_script_progression --message="Storing installation settings..." --time --wei ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language_key +ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/remove b/scripts/remove index bae2564..9a55410 100755 --- a/scripts/remove +++ b/scripts/remove @@ -26,6 +26,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # STANDARD REMOVE diff --git a/scripts/restore b/scripts/restore index 2b6268f..9c420a5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -38,6 +38,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index 39b60c0..7f2e5f9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,7 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) language_key=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) +password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # CHECK VERSION From ab26834b8758de42da65077714e8c62fc0911573 Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 18 Jun 2022 01:38:56 +0700 Subject: [PATCH 26/29] Correct date + multi instance --- check_process | 2 +- manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index b16e300..fc45223 100644 --- a/check_process +++ b/check_process @@ -19,7 +19,7 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=1 ;;; Options diff --git a/manifest.json b/manifest.json index fd25d80..121a29c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "AI-Powered Photos App for the Decentralized Web", "fr": "Gestion de photos en ligne" }, - "version": "2022.28.05~ynh2", + "version": "2022.05.28~ynh2", "url": "photoprism.app", "upstream": { "license": "AGPL-3.0-only", From ff778481083fa64ce3bc56bca7c8648583c74f6b Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 18 Jun 2022 01:54:32 +0700 Subject: [PATCH 27/29] Warning --- doc/DISCLAIMER.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 27c354d..d3a719c 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,4 +1,6 @@ * Known limitations: + * Although reaching level 7, Photoprism hasn't yet been extensively tested in real conditions + * Please use with **extreme care** if you install it on a test server ! * Not tested yet with AMD architecture * Photoprism currently supports only one user. OIDC should be supported within a few months * Photoprism requires an important amount of RAM and disk to install or to work properly From b6af984a744bc5882e373a89e5ea951a1c973994 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 18 Jun 2022 02:41:51 +0000 Subject: [PATCH 28/29] Auto-update README --- README.md | 4 +++- README_fr.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 535754e..43748fb 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use - Automatic classification of pictures based on their content and location -**Shipped version:** 2022.28.05~ynh1 +**Shipped version:** 2022.05.28~ynh2 **Demo:** https://demo-fr.photoprism.app @@ -38,6 +38,8 @@ PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use ## Disclaimers / important information * Known limitations: + * Although reaching level 7, Photoprism hasn't yet been extensively tested in real conditions + * Please use with **extreme care** if you install it on a test server ! * Not tested yet with AMD architecture * Photoprism currently supports only one user. OIDC should be supported within a few months * Photoprism requires an important amount of RAM and disk to install or to work properly diff --git a/README_fr.md b/README_fr.md index ddfa101..47594ec 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use - Automatic classification of pictures based on their content and location -**Version incluse :** 2022.28.05~ynh1 +**Version incluse :** 2022.05.28~ynh2 **Démo :** https://demo-fr.photoprism.app @@ -38,6 +38,8 @@ PhotoPrism® is an AI-Powered Photos App for the Decentralized Web. It makes use ## Avertissements / informations importantes * Known limitations: + * Although reaching level 7, Photoprism hasn't yet been extensively tested in real conditions + * Please use with **extreme care** if you install it on a test server ! * Not tested yet with AMD architecture * Photoprism currently supports only one user. OIDC should be supported within a few months * Photoprism requires an important amount of RAM and disk to install or to work properly From 086102b434220cf8dccbf103ce718b5a675d058c Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 18 Jun 2022 09:44:50 +0700 Subject: [PATCH 29/29] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 121a29c..5d33057 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "url": "photoprism.app", "upstream": { "license": "AGPL-3.0-only", - "website": "photoprism.app", + "website": "https://photoprism.app", "demo": "https://demo-fr.photoprism.app", "admindoc": "https://docs.photoprism.app/developer-guide/", "userdoc": "https://docs.photoprism.app/user-guide/",