From c790de50563eae46ab96c294551e7f784e47db1d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 28 Apr 2022 06:18:25 +0000 Subject: [PATCH 1/9] Upgrade to v0.90.8 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 3c48fd7..6308d6e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "No-code platform that turns any database into a smart spreadsheet", "fr": "Plateform sans code qui transforme toute base de données en un tableur intelligent." }, - "version": "0.90.2~ynh1", + "version": "0.90.8~ynh1", "url": "https://www.nocodb.com/", "upstream": { "license": "AGPL-3.0-only", From f50cbd7809a61df170325da184853d3f579c0176 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 28 Apr 2022 06:18:29 +0000 Subject: [PATCH 2/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 54f13b6..25e7dee 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Shipped version:** 0.90.2~ynh1 +**Shipped version:** 0.90.8~ynh1 **Demo:** https://www.nocodb.com/demos diff --git a/README_fr.md b/README_fr.md index d6fe600..b896afb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Version incluse :** 0.90.2~ynh1 +**Version incluse :** 0.90.8~ynh1 **Démo :** https://www.nocodb.com/demos From 5200ae6514a0ac6e7030f58993185680a243e47b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 5 May 2022 06:16:39 +0000 Subject: [PATCH 3/9] Upgrade to v0.90.11 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6308d6e..700b2f0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "No-code platform that turns any database into a smart spreadsheet", "fr": "Plateform sans code qui transforme toute base de données en un tableur intelligent." }, - "version": "0.90.8~ynh1", + "version": "0.90.11~ynh1", "url": "https://www.nocodb.com/", "upstream": { "license": "AGPL-3.0-only", From 52b13c4ad914f78b78e307da10792e8c2c42c301 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 5 May 2022 06:16:42 +0000 Subject: [PATCH 4/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25e7dee..ee1927e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Shipped version:** 0.90.8~ynh1 +**Shipped version:** 0.90.11~ynh1 **Demo:** https://www.nocodb.com/demos diff --git a/README_fr.md b/README_fr.md index b896afb..284dbcf 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Version incluse :** 0.90.8~ynh1 +**Version incluse :** 0.90.11~ynh1 **Démo :** https://www.nocodb.com/demos From e6e0a999f3bec96350743461bbb2bb5f5aaa9b26 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 21 Jun 2022 03:15:06 +0200 Subject: [PATCH 5/9] Apply example_ynh --- check_process | 9 -------- conf/app.src | 3 ++- manifest.json | 6 +++--- scripts/_common.sh | 1 + scripts/backup | 1 - scripts/change_url | 8 +++---- scripts/install | 12 ++++++----- scripts/remove | 22 +++++++++---------- scripts/restore | 34 ++++++++++++++---------------- scripts/upgrade | 20 ++++++++++-------- sources/extra_files/app/.gitignore | 2 -- sources/patches/.gitignore | 2 -- 12 files changed, 54 insertions(+), 66 deletions(-) delete mode 100644 sources/extra_files/app/.gitignore delete mode 100644 sources/patches/.gitignore diff --git a/check_process b/check_process index ada3dc1..cf97ffd 100644 --- a/check_process +++ b/check_process @@ -1,10 +1,6 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest domain="domain.tld" - path="/" is_public=1 ; Checks pkg_linter=1 @@ -22,8 +18,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& - diff --git a/conf/app.src b/conf/app.src index 64a1e25..e00b615 100644 --- a/conf/app.src +++ b/conf/app.src @@ -2,5 +2,6 @@ SOURCE_URL=https://github.com/nocodb/nocodb-seed/archive/8400c313906da8293014fd5 SOURCE_SUM=9307888a5e21cb220280ca688bde6f71fafae4c3738df72e88a990d52c3c5544 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip -SOURCE_EXTRACT=true SOURCE_IN_SUBDIR=true +SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/manifest.json b/manifest.json index 700b2f0..b31d64e 100644 --- a/manifest.json +++ b/manifest.json @@ -7,10 +7,10 @@ "fr": "Plateform sans code qui transforme toute base de données en un tableur intelligent." }, "version": "0.90.11~ynh1", - "url": "https://www.nocodb.com/", + "url": "https://www.nocodb.com", "upstream": { "license": "AGPL-3.0-only", - "website": "https://www.nocodb.com/", + "website": "https://www.nocodb.com", "demo": "https://www.nocodb.com/demos", "code": "https://github.com/nocodb/nocodb" }, @@ -20,7 +20,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 4.3" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index b818f0f..44d7f52 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,7 @@ # COMMON VARIABLES #================================================= +# dependencies used by the app nodejs_version=16 #================================================= diff --git a/scripts/backup b/scripts/backup index ca47243..00469b9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script diff --git a/scripts/change_url b/scripts/change_url index 901acdb..d8cf880 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -17,14 +17,10 @@ old_domain=$YNH_APP_OLD_DOMAIN old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH +new_path="/" app=$YNH_APP_INSTANCE_NAME -if [ $new_path != "/" ]; then - ynh_die --message="The app can only be installed at the root of a domain." -fi - #================================================= # LOAD SETTINGS #================================================= @@ -41,6 +37,7 @@ ynh_script_progression --message="Backing up the app before changing its URL (ma # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" @@ -117,6 +114,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 +# Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= diff --git a/scripts/install b/scripts/install index 5c3ab41..f9d78ee 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ynh_clean_check_starting +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -21,11 +24,13 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url="/" #$YNH_APP_ARG_PATH +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME +jwt_secret=$(ynh_string_random --length=20) + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -50,6 +55,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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=jwt_secret --value=$jwt_secret #================================================= # STANDARD MODIFICATIONS @@ -117,7 +123,6 @@ ynh_script_progression --message="Installing NocoDB..." --weight=5 ynh_use_nodejs pushd $final_path - if [ $YNH_ARCH = "arm64" ]; then ynh_print_info --message="Retrieving and building OracleDB for ARM64..." ynh_exec_warn_less ynh_exec_as $app git clone --recursive https://github.com/oracle/node-oracledb.git oracledb @@ -136,9 +141,6 @@ popd #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -jwt_secret=$(ynh_string_random --length=20) -ynh_app_setting_set --app=$app --key=jwt_secret --value=$jwt_secret - ynh_add_config --template="env" --destination="$final_path/.env" chmod 400 "$final_path/.env" diff --git a/scripts/remove b/scripts/remove index 2c5078e..8559b21 100755 --- a/scripts/remove +++ b/scripts/remove @@ -43,6 +43,14 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config +#================================================= +# REMOVE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 + +# Remove the app-specific logrotate config +ynh_remove_logrotate + #================================================= # REMOVE THE MYSQL DATABASE #================================================= @@ -51,13 +59,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -ynh_remove_nodejs - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -75,12 +76,11 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- ynh_remove_nginx_config #================================================= -# REMOVE LOGROTATE CONFIGURATION +# REMOVE DEPENDENCIES #================================================= -ynh_script_progression --message="Removing logrotate configuration..." --weight=1 +ynh_script_progression --message="Removing dependencies..." --weight=1 -# Remove the app-specific logrotate config -ynh_remove_logrotate +ynh_remove_nodejs #================================================= # SPECIFIC REMOVE diff --git a/scripts/restore b/scripts/restore index 3055ae1..172a166 100755 --- a/scripts/restore +++ b/scripts/restore @@ -15,8 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -33,7 +32,6 @@ 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 -nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -45,13 +43,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -80,6 +71,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=2 ynh_install_nodejs --nodejs_version=$nodejs_version +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -108,6 +106,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -122,17 +127,10 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= -# RELOAD NGINX AND PHP-FPM +# RELOAD NGINX #================================================= ynh_script_progression --message="Reloading NGINX web server..." --weight=1 diff --git a/scripts/upgrade b/scripts/upgrade index f11ea44..6ea209f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) @@ -36,6 +37,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # Restore it if the upgrade fails ynh_restore_upgradebackup } @@ -54,7 +56,7 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -#ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 #================================================= # CREATE DEDICATED USER @@ -80,14 +82,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 - -# Create a dedicated NGINX config -ynh_add_nginx_config - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -98,6 +92,14 @@ if [ $nodejs_version != $(ynh_app_setting_get --app=$app --key=nodejs_version) ] ynh_install_nodejs --nodejs_version=$nodejs_version fi +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config + #================================================= # SPECIFIC UPGRADE #================================================= diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/extra_files/app/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/sources/patches/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] From c513b47390a31d09f227bed2ed41068ae70a63f8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 21 Jun 2022 03:15:43 +0200 Subject: [PATCH 6/9] Disable multiinstance port 8083 already in use --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cf97ffd..024f7b5 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ upgrade=1 #upgrade=1 from_commit=CommitHash backup_restore=1 - multi_instance=1 + multi_instance=0 port_already_use=0 change_url=1 ;;; Options From 21573303c465a393ed4adbeb2b8d0cd9fa1640be Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 21 Jun 2022 01:15:48 +0000 Subject: [PATCH 7/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b1cb0a1..935053e 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ NocoDB has its own authentication system which does not rely on YunoHost's SSO o ## Documentation and resources -* Official app website: +* Official app website: * Upstream app code repository: * YunoHost documentation for this app: * Report a bug: diff --git a/README_fr.md b/README_fr.md index aa55fc8..7547e7a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -43,7 +43,7 @@ NocoDB has its own authentication system which does not rely on YunoHost's SSO o ## Documentations et ressources -* Site officiel de l'app : +* Site officiel de l'app : * Dépôt de code officiel de l'app : * Documentation YunoHost pour cette app : * Signaler un bug : From 1245520b057e74c76a5ab316fcd70eb84c9734c9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 21 Jun 2022 13:29:03 +0200 Subject: [PATCH 8/9] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index b31d64e..6753ae8 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,7 @@ "requirements": { "yunohost": ">= 4.3.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx", "php7.3-fpm", From d89f8edb52150e8ebbc43529f056c92418702971 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 23 Jun 2022 14:17:11 +0200 Subject: [PATCH 9/9] line_match --- scripts/change_url | 2 +- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index d8cf880..6d59ec1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -115,7 +115,7 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index f9d78ee..9964748 100755 --- a/scripts/install +++ b/scripts/install @@ -177,7 +177,7 @@ yunohost service add $app --description="$app daemon, turns any database into a ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 172a166..0af2d78 100755 --- a/scripts/restore +++ b/scripts/restore @@ -125,7 +125,7 @@ yunohost service add $app --description="$app daemon, turns any database into a #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 6ea209f..ec06d50 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -151,7 +151,7 @@ yunohost service add $app --description="$app daemon, turns any database into a #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="Visit : localhost:" #================================================= # RELOAD NGINX