From d646cc34313ff8cd168f3f4566d233a7e7cac892 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:03:23 +0200 Subject: [PATCH 01/25] test --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 4227f21..1dbcf26 100755 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH npm install moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password From b6da9851e3ac1c418dc90fc1be8742ce08efb462 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:03:44 +0200 Subject: [PATCH 02/25] node 20 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b02dd0b..b6e36fe 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_COMPOSER_VERSION="2.6.5" -NODEJS_VERSION=18 +NODEJS_VERSION="20" #================================================= # PERSONAL HELPERS From 01bcd9c7736c22798e7444bd8f8e19d53a75d2c2 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:10:02 +0200 Subject: [PATCH 03/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1dbcf26..394c144 100755 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH npm install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ynh_npm install moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password From 52380a5fe924619444cb30942ff39fa757441378 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:18:08 +0200 Subject: [PATCH 04/25] =?UTF-8?q?=F0=9F=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 394c144..8991220 100755 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH ynh_npm install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password From cfa7aeb9159b4800b0137bbc0bd0777d2fe4d5a1 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:38:37 +0200 Subject: [PATCH 05/25] Update .env --- conf/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/.env b/conf/.env index 9f586c4..5530762 100644 --- a/conf/.env +++ b/conf/.env @@ -4,7 +4,7 @@ # Two choices: local|production. Use local if you want to install Monica as a # development version. Use production otherwise. -APP_ENV=local +APP_ENV=production # true if you want to show debug information on errors. For production, put this # to false. From 08b1860d0a1907460e44beccfca39f9276899c84 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:41:33 +0200 Subject: [PATCH 06/25] NODE_ENV=production --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 8991220..5434a36 100755 --- a/scripts/install +++ b/scripts/install @@ -89,9 +89,9 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install moment-locales-webpack-plugin - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install --production - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production + # ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production yarn install --production + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt mobile_id=$( cd $install_dir && tail -2 key.txt | head -1 | cut -c 12- ) From 847c8f37e02c940b5762b2be144ab7c33a4dbffb Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:56:15 +0200 Subject: [PATCH 07/25] Update install --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 5434a36..fd95f13 100755 --- a/scripts/install +++ b/scripts/install @@ -89,9 +89,9 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - # ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install moment-locales-webpack-plugin - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production yarn install --production - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production yarn run production + # ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local $ynh_npm install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn install --production + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt mobile_id=$( cd $install_dir && tail -2 key.txt | head -1 | cut -c 12- ) From 007aeacb102c9d94520c803c341fc9bbcfbde366 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:22:54 +0200 Subject: [PATCH 08/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fd95f13..fc04f65 100755 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - # ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local $ynh_npm install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local yarn install moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password From 28f12e33b34782b4d8e999f0716c5b66fd96242e Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:26:58 +0200 Subject: [PATCH 09/25] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fc04f65..c6e59c7 100755 --- a/scripts/install +++ b/scripts/install @@ -89,7 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local yarn install moment-locales-webpack-plugin + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local yarn add moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password From fbd6ae42eac20a92cbf4159d69a77b2a6ccecea0 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:45:43 +0200 Subject: [PATCH 10/25] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index c6e59c7..fc75de9 100755 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,7 @@ ynh_script_progression --message="Deploying $app..." pushd "$install_dir" ynh_use_nodejs + yarn cache clean ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local yarn add moment-locales-webpack-plugin ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn install --production ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn run production From de3a991ae75d92b37f69ee6e632e45fc4883c248 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:48:15 +0200 Subject: [PATCH 11/25] revert --- manifest.toml | 10 +++++----- scripts/install | 29 +++++++++++++---------------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1a48402..1654e59 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Monica" description.en = "Personal Relationship Manager" description.fr = "Gestionnaire de relations personnelles" -version = "4.1.2~ynh1" +version = "4.0.0~ynh3" maintainers = ["Sebastian Gumprich"] @@ -57,8 +57,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/monicahq/monica/archive/v4.1.2.zip" - sha256 = "792bb0af6bfb33abd3c4694eed309cf6c33001e589328c418bb1231e063d60d6" + url = "https://github.com/monicahq/monica/archive/v4.0.0.zip" + sha256 = "5b108525a2f5fedc0a2bb82a49d3de47d087b33082fb21e64f874d387304ed9f" autoupdate.strategy = "latest_github_tag" [resources.system_user] @@ -70,11 +70,11 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-bcmath, php8.2-cli, php8.2-curl, php8.2-dom, php8.2-gd, php8.2-gmp, php8.2-iconv, php8.2-intl, php8.2-mbstring, php8.2-mysql, php8.2-mysqli, php8.2-opcache, php8.2-redis, php8.2-xml, php8.2-zip" + packages = "mariadb-server, php8.1-bcmath, php8.1-cli, php8.1-curl, php8.1-dom, php8.1-gd, php8.1-gmp, php8.1-iconv, php8.1-intl, php8.1-mbstring, php8.1-mysql, php8.1-mysqli, php8.1-opcache, php8.1-redis, php8.1-xml, php8.1-zip" extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" extras.yarn.packages = "yarn" [resources.database] - type = "mysql" + type = "mysql" \ No newline at end of file diff --git a/scripts/install b/scripts/install index fc75de9..ad456b4 100755 --- a/scripts/install +++ b/scripts/install @@ -15,12 +15,18 @@ source /usr/share/yunohost/helpers random_key=$(ynh_string_random --length=32) email=$(ynh_user_get_info --username=$admin --key="mail") +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_app_setting_set --app=$app --key=random_key --value=$random_key +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # STANDARD MODIFICATIONS @@ -47,7 +53,7 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 -ynh_add_fpm_config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config @@ -57,9 +63,9 @@ ynh_add_nginx_config #================================================= # INSTALL COMPOSER DEPENDENCIES #================================================= -ynh_script_progression --message="Installing Composer dependencies..." +ynh_script_progression --message="Installing composer dependencies..." -ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --composerversion="$YNH_COMPOSER_VERSION" --workdir="$install_dir" +ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" @@ -85,14 +91,12 @@ ynh_replace_string --target_file="$install_dir/package.json" --match_string="php #================================================= # DEPLOY #================================================= -ynh_script_progression --message="Deploying $app..." +ynh_script_progression --message="Deploying..." pushd "$install_dir" ynh_use_nodejs - yarn cache clean - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH APP_ENV=local yarn add moment-locales-webpack-plugin - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn install --production - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV=production APP_ENV=local yarn run production + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn install + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH yarn run production ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan setup:production --force --email=$email --password=$password ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan passport:client --password -n > key.txt mobile_id=$( cd $install_dir && tail -2 key.txt | head -1 | cut -c 12- ) @@ -111,13 +115,6 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" -#================================================== -# FIX PHP VERSION -#================================================== -ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 - -ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" - #================================================= # INSTALL THE CRON FILE #================================================= @@ -132,4 +129,4 @@ chmod 644 "/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of $app completed" --last \ No newline at end of file From 5fab23a4658b7484f49c2c1b3b87e2baf5a66505 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:52:39 +0200 Subject: [PATCH 12/25] fix --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b6e36fe..a990722 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_COMPOSER_VERSION="2.6.5" -NODEJS_VERSION="20" +NODEJS_VERSION="18" #================================================= # PERSONAL HELPERS From 10f6ee24d5818b2e13b18196198f048ba8a100ca Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 16 Jun 2024 20:07:20 +0200 Subject: [PATCH 13/25] upgrade to 4.1.2 --- manifest.toml | 6 +++--- scripts/_common.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 1654e59..b3b3aed 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Monica" description.en = "Personal Relationship Manager" description.fr = "Gestionnaire de relations personnelles" -version = "4.0.0~ynh3" +version = "4.1.2~ynh1" maintainers = ["Sebastian Gumprich"] @@ -57,8 +57,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://github.com/monicahq/monica/archive/v4.0.0.zip" - sha256 = "5b108525a2f5fedc0a2bb82a49d3de47d087b33082fb21e64f874d387304ed9f" + url = "https://github.com/monicahq/monica/archive/v4.1.2.zip" + sha256 = "792bb0af6bfb33abd3c4694eed309cf6c33001e589328c418bb1231e063d60d6" autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index a990722..b6e36fe 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_COMPOSER_VERSION="2.6.5" -NODEJS_VERSION="18" +NODEJS_VERSION="20" #================================================= # PERSONAL HELPERS From 18b6f6acdb8f95767327a649d71a2b7729239fc2 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 16 Jun 2024 21:30:05 +0200 Subject: [PATCH 14/25] ugprade php --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b3b3aed..9ccd1d9 100644 --- a/manifest.toml +++ b/manifest.toml @@ -70,7 +70,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.1-bcmath, php8.1-cli, php8.1-curl, php8.1-dom, php8.1-gd, php8.1-gmp, php8.1-iconv, php8.1-intl, php8.1-mbstring, php8.1-mysql, php8.1-mysqli, php8.1-opcache, php8.1-redis, php8.1-xml, php8.1-zip" + packages = "mariadb-server, php8.2-bcmath, php8.2-cli, php8.2-curl, php8.2-dom, php8.2-gd, php8.2-gmp, php8.2-iconv, php8.2-intl, php8.2-mbstring, php8.2-mysql, php8.2-mysqli, php8.2-opcache, php8.2-redis, php8.2-xml, php8.2-zip" extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" From 28006d850f29ce8af3c1145f44abed762dc541aa Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:07:23 +0200 Subject: [PATCH 15/25] php artisan cache clear --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index ad456b4..7c46929 100755 --- a/scripts/install +++ b/scripts/install @@ -107,6 +107,7 @@ pushd "$install_dir" ynh_app_setting_set --app=$app --key=mobile_key --value=$mobile_key ynh_secure_remove --file="$install_dir/key.txt" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan cache:clear popd # Calculate and store the config file checksum into the app settings @@ -129,4 +130,4 @@ chmod 644 "/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last \ No newline at end of file +ynh_script_progression --message="Installation of $app completed" --last From af74855fe7f93b5e2cf5c43d6eead369b5b26149 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 12:40:13 +0200 Subject: [PATCH 16/25] fix 405 error --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7c46929..dc476f3 100755 --- a/scripts/install +++ b/scripts/install @@ -107,7 +107,7 @@ pushd "$install_dir" ynh_app_setting_set --app=$app --key=mobile_key --value=$mobile_key ynh_secure_remove --file="$install_dir/key.txt" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan cache:clear + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan optimize:clear popd # Calculate and store the config file checksum into the app settings From 1c06aaae5e8838ccd28512b090eb432f52397175 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:39:28 +0200 Subject: [PATCH 17/25] remove failing test --- tests.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests.toml b/tests.toml index 242423a..cbbeef1 100644 --- a/tests.toml +++ b/tests.toml @@ -1,5 +1,3 @@ test_format = 1.0 [default] - - test_upgrade_from.272460bc.name = "Upgrade from 3.7.0~ynh2" From 139544546a714e007f9491626cf39414f97ecd1d Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:41:11 +0200 Subject: [PATCH 18/25] Update change_url --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index ffe543d..ee781df 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,6 +25,7 @@ ynh_change_url_nginx_config # Run monica update pushd "$install_dir" /usr/bin/php$phpversion artisan monica:update --force + /usr/bin/php$phpversion artisan optimize:clear popd #================================================= From 0a57bec8bab230c8cd817776eaad134bb88093c8 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:04:19 +0200 Subject: [PATCH 19/25] remove php-fpm config --- conf/extra_php-fpm.conf | 4 ---- scripts/install | 14 +------------- scripts/remove | 3 --- scripts/upgrade | 17 ----------------- 4 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 conf/extra_php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf deleted file mode 100644 index 700c37c..0000000 --- a/conf/extra_php-fpm.conf +++ /dev/null @@ -1,4 +0,0 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M diff --git a/scripts/install b/scripts/install index dc476f3..019f180 100755 --- a/scripts/install +++ b/scripts/install @@ -15,18 +15,12 @@ source /usr/share/yunohost/helpers random_key=$(ynh_string_random --length=32) email=$(ynh_user_get_info --username=$admin --key="mail") -fpm_footprint="low" -fpm_free_footprint=0 -fpm_usage="low" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_app_setting_set --app=$app --key=random_key --value=$random_key -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # STANDARD MODIFICATIONS @@ -48,12 +42,6 @@ ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 - -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config @@ -107,7 +95,7 @@ pushd "$install_dir" ynh_app_setting_set --app=$app --key=mobile_key --value=$mobile_key ynh_secure_remove --file="$install_dir/key.txt" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache - ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan optimize:clear + ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan optimize:clear popd # Calculate and store the config file checksum into the app settings diff --git a/scripts/remove b/scripts/remove index a05a07a..ce76378 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,9 +17,6 @@ ynh_script_progression --message="Removing system configurations related to $app # Remove the dedicated NGINX config ynh_remove_nginx_config -# Remove the dedicated PHP-FPM config -ynh_remove_fpm_config - # Remove metapackage and its dependencies ynh_remove_nodejs diff --git a/scripts/upgrade b/scripts/upgrade index f08b1dd..7f36a46 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,9 +38,6 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= ynh_script_progression --message="Updating $app's configuration files..." --weight=1 -# Create a dedicated PHP-FPM config -ynh_add_fpm_config - # Create a dedicated NGINX config ynh_add_nginx_config @@ -108,26 +105,12 @@ pushd "$install_dir" ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan config:cache popd -#if ynh_version_gt "2.15.0" "${previous_version}" ; then -# ynh_script_progression --message="Upgrading for 2.15.0..." -# pushd "$install_dir" -# ynh_exec_warn_less ynh_exec_as $app php$phpversion artisan monica:moveavatarstophotosdirectory -# popd -#fi - # Calculate and store the config file checksum into the app settings ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" -#================================================== -# FIX PHP VERSION -#================================================== -ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 - -ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" - #================================================= # INSTALL THE CRON FILE #================================================= From 3921b7939c95f91ceba990a7ffd8d0c0807f9aae Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:05:21 +0200 Subject: [PATCH 20/25] fix --- scripts/install | 6 ++++++ scripts/remove | 3 +++ 2 files changed, 9 insertions(+) diff --git a/scripts/install b/scripts/install index 019f180..0b1fde0 100755 --- a/scripts/install +++ b/scripts/install @@ -42,6 +42,12 @@ ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 + +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index ce76378..a05a07a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,6 +17,9 @@ ynh_script_progression --message="Removing system configurations related to $app # Remove the dedicated NGINX config ynh_remove_nginx_config +# Remove the dedicated PHP-FPM config +ynh_remove_fpm_config + # Remove metapackage and its dependencies ynh_remove_nodejs From 9b3abf03f380acc0921ac8207ed60ea5712e6e42 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:10:35 +0200 Subject: [PATCH 21/25] fix --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 0b1fde0..6ef511d 100755 --- a/scripts/install +++ b/scripts/install @@ -21,6 +21,9 @@ email=$(ynh_user_get_info --username=$admin --key="mail") #================================================= ynh_app_setting_set --app=$app --key=random_key --value=$random_key +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # STANDARD MODIFICATIONS From 0a73f1d5b35030feecb17b9e7bfbcd8d9115f883 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:17:10 +0200 Subject: [PATCH 22/25] fix --- conf/extra_php-fpm.conf | 4 ++++ scripts/install | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 conf/extra_php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..151b0c1 --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M \ No newline at end of file diff --git a/scripts/install b/scripts/install index 6ef511d..d55f618 100755 --- a/scripts/install +++ b/scripts/install @@ -21,9 +21,6 @@ email=$(ynh_user_get_info --username=$admin --key="mail") #================================================= ynh_app_setting_set --app=$app --key=random_key --value=$random_key -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # STANDARD MODIFICATIONS @@ -50,8 +47,6 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint - # Create a dedicated NGINX config ynh_add_nginx_config From a9ee2785c1027a26b97fd7d25344217351b135b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:46:01 +0200 Subject: [PATCH 23/25] cleaning --- scripts/backup | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/backup b/scripts/backup index 35afc88..1008ecb 100755 --- a/scripts/backup +++ b/scripts/backup @@ -22,21 +22,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/etc/cron.d/$app" #================================================= From e11ab8c570d640699f51045a40a31196abdc5815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:48:11 +0200 Subject: [PATCH 24/25] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index d55f618..991f0f3 100755 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,8 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 +ynh_add_fpm_config + # Create a dedicated NGINX config ynh_add_nginx_config From 938d7f71405c3350c3cfa9edafcfe7fd6b33e117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:48:31 +0200 Subject: [PATCH 25/25] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 7f36a46..de7b9a5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,6 +38,8 @@ ynh_install_nodejs --nodejs_version=$NODEJS_VERSION #================================================= ynh_script_progression --message="Updating $app's configuration files..." --weight=1 +ynh_add_fpm_config + # Create a dedicated NGINX config ynh_add_nginx_config