From 099c53b9499a4ffe100716a80346c48a47d14ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:30:14 +0100 Subject: [PATCH 01/24] fix --- conf/nginx.conf | 29 +++++++---------------------- conf/systemd.service | 2 +- manifest.json | 4 ++-- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6b738ce..b8a6b46 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,28 +1,13 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location ^~ __PATH__/ { - # Path to source - alias __FINALPATH__/; - -### Example PHP configuration (remove it if not used) - index index.php; - - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; - - try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } -### End of PHP configuration part + proxy_pass http://127.0.0.1:__PORT__/; + proxy_http_version 1.1; + proxy_set_header Connection "upgrade"; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header X-Forwarded-For $remote_addr; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; + more_clear_input_headers 'Accept-Encoding'; } diff --git a/conf/systemd.service b/conf/systemd.service index d0badc8..2b708ad 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Calckey: A greatly enhanced fork of Misskey with better UI/UX, security, features, and more! +Description=Calckey: fork of Misskey After=network.target [Service] diff --git a/manifest.json b/manifest.json index 99e63b9..c26f6c9 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "calckey", "packaging_format": 1, "description": { - "en": "A greatly enhanced fork of Misskey with better UI/UX, security, features, and more!", - "fr": "Un fork de Misskey grandement amélioré avec une meilleure interface utilisateur/UX, la sécurité, les fonctionnalités, et plus encore !" + "en": "Fork of Misskey with better UI/UX, security, features", + "fr": "Un fork de Misskey avec une meilleure interface utilisateur, la sécurité, les fonctionnalités" }, "version": "13.0.5~ynh1", "url": "https://i.calckey.cloud/", From ee6f7234e6ec91488dc45cf6abbb2f84783cade9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:33:26 +0100 Subject: [PATCH 02/24] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index f5aeb98..c29aba7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="16.15.0" +NODEJS_VERSION="18" # dependencies used by the app pkg_dependencies="ffmpeg postgresql" From f5e5843667eed0734e519bc341b19de37af400b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:33:35 +0100 Subject: [PATCH 03/24] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c29aba7..c234292 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="18" +NODEJS_VERSION="19" # dependencies used by the app pkg_dependencies="ffmpeg postgresql" From ebba4c8b3557757ea5e5edbc3712db71e20b05fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:41:06 +0100 Subject: [PATCH 04/24] Fix --- conf/systemd.service | 4 ++-- scripts/install | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 2b708ad..f59930b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,9 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -Environment="__YNH_NODE_LOAD_PATH__" +Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -ExecStart=__YNH_NPM__ start +ExecStart=/usr/bin/yarn start TimeoutSec=60 Restart=always diff --git a/scripts/install b/scripts/install index 32c0531..6a87a6c 100755 --- a/scripts/install +++ b/scripts/install @@ -71,7 +71,9 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Installing dependencies..." --weight=3 ynh_install_nodejs --nodejs_version=$NODEJS_VERSION + ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" #================================================= @@ -132,8 +134,10 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn init + #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build + #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init popd #================================================= @@ -141,6 +145,7 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config From 162608276896f4da79828de1f95e7494d4eba999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:44:43 +0100 Subject: [PATCH 05/24] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6a87a6c..1d2fb5f 100755 --- a/scripts/install +++ b/scripts/install @@ -134,7 +134,7 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn init #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init From c9438c432543ff138b8ee114d8f4d1974fca5721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:49:12 +0100 Subject: [PATCH 06/24] Update install --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 1d2fb5f..1a07fa9 100755 --- a/scripts/install +++ b/scripts/install @@ -134,8 +134,8 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn init + #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild + #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn init #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init popd From 4d7da67c4b81e6d16d1f9bba8e83b5e341207386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 20:02:05 +0100 Subject: [PATCH 07/24] Update install --- scripts/install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 1a07fa9..aba988b 100755 --- a/scripts/install +++ b/scripts/install @@ -134,10 +134,11 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs - #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild - #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn init - #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build - #ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run init + corepack enable + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild popd #================================================= From e64edfed9e3bc9e2c6dfff03bf278f6bb07d801c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 4 Jan 2023 22:28:34 +0100 Subject: [PATCH 08/24] Update nginx.conf --- conf/nginx.conf | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b8a6b46..565b921 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,13 +1,25 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location ^~ __PATH__/ { +location __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__/; + proxy_pass http://127.0.0.1:__PORT__; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto https; proxy_http_version 1.1; - proxy_set_header Connection "upgrade"; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_redirect off; + # For WebSocket + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + # Cache settings + #proxy_cache cache1; + proxy_cache_lock on; + proxy_cache_use_stale updating; + more_set_headers "X-Cache: $upstream_cache_status"; + # Change to upload limit + client_max_body_size 80m; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; - more_clear_input_headers 'Accept-Encoding'; } From 2e014b34d34556207121d4da8bbf32d406db0902 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 13:08:21 +0100 Subject: [PATCH 09/24] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index aba988b..11af26e 100755 --- a/scripts/install +++ b/scripts/install @@ -134,6 +134,7 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools From 739433511e281629051a07f5a62e3ca38ba36903 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 14:04:00 +0100 Subject: [PATCH 10/24] Update systemd.service --- conf/systemd.service | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/systemd.service b/conf/systemd.service index f59930b..b83398a 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,6 +10,7 @@ WorkingDirectory=__FINALPATH__/ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" ExecStart=/usr/bin/yarn start +ExecStart=__YNH_NPM__ start TimeoutSec=60 Restart=always From 7f8b399340b600667e23c4287e03b8a6a691a8d4 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 16:50:05 +0100 Subject: [PATCH 11/24] Update systemd.service --- conf/systemd.service | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index b83398a..616d563 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,6 @@ Group=__APP__ WorkingDirectory=__FINALPATH__/ Environment="PATH=__ENV_PATH__" Environment="NODE_ENV=production" -ExecStart=/usr/bin/yarn start ExecStart=__YNH_NPM__ start TimeoutSec=60 Restart=always From 18b6f419b2def0c6f1ae40882fbbe05a6d7af37f Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 17:36:46 +0100 Subject: [PATCH 12/24] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 11af26e..5df1974 100755 --- a/scripts/install +++ b/scripts/install @@ -135,6 +135,7 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools From 3ec2ba3ea42ab5f1481363ac78a25faac69bdb50 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 17:59:22 +0100 Subject: [PATCH 13/24] Update install --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 5df1974..11af26e 100755 --- a/scripts/install +++ b/scripts/install @@ -135,7 +135,6 @@ ynh_script_progression --message="Building app..." --weight=15 pushd "$final_path" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install corepack enable ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools From 091438966789e3d07bc3407ebd1f69274a747a6a Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:01:45 +0100 Subject: [PATCH 14/24] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 565b921..b21069c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,7 +14,7 @@ location __PATH__/ { proxy_set_header Connection $connection_upgrade; # Cache settings - #proxy_cache cache1; + proxy_cache cache1; proxy_cache_lock on; proxy_cache_use_stale updating; more_set_headers "X-Cache: $upstream_cache_status"; From 092bc1c4b93e4c37d1e2dbf756d08204b6e60eef Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:14:33 +0100 Subject: [PATCH 15/24] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index b21069c..32ad407 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,7 +14,7 @@ location __PATH__/ { proxy_set_header Connection $connection_upgrade; # Cache settings - proxy_cache cache1; + # proxy_cache cache1; proxy_cache_lock on; proxy_cache_use_stale updating; more_set_headers "X-Cache: $upstream_cache_status"; From dcd0ff946b256772e4774381d49b50400c0fcf07 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:20:32 +0100 Subject: [PATCH 16/24] Update nginx.conf --- conf/nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 32ad407..012d31e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,9 @@ +# For WebSocket +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { From 56070e6b03bbdf559e4cbf2ab7c3c9d22088853f Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:25:28 +0100 Subject: [PATCH 17/24] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c234292..ffeb039 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ NODEJS_VERSION="19" # dependencies used by the app -pkg_dependencies="ffmpeg postgresql" +pkg_dependencies="ffmpeg postgresql build-essential" #================================================= # PERSONAL HELPERS From 8a39b66b6483ecabc51a97c57a839ba1c00937d3 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:32:25 +0100 Subject: [PATCH 18/24] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 11af26e..18c864e 100755 --- a/scripts/install +++ b/scripts/install @@ -139,7 +139,8 @@ pushd "$final_path" ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn set version berry ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn plugin import workspace-tools ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn rebuild + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run rebuild + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate popd #================================================= From 008be41ed39d7488ebcb5e956d0fc2e772505a9c Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 18:39:54 +0100 Subject: [PATCH 19/24] Update nginx.conf --- conf/nginx.conf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 012d31e..32ad407 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,9 +1,3 @@ -# For WebSocket -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} - #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { From 8fa47cee789fb77c87e023c0474299e26a94da53 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 19:41:35 +0100 Subject: [PATCH 20/24] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index c63dad9..b998615 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ upgrade=1 # upgrade=1 from_commit=CommitHash backup_restore=1 - multi_instance=1 + multi_instance=0 change_url=0 ;;; Options Email= From 89047b1f5cda5a9cdd8e332d9b5a88aa06a972c6 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 19:42:07 +0100 Subject: [PATCH 21/24] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c26f6c9..21c0482 100644 --- a/manifest.json +++ b/manifest.json @@ -21,7 +21,7 @@ "requirements": { "yunohost": ">= 11.0.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx" ], From 899cb562fc0c84bc5f014a3d4508ef56c4a2b81d Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 20:05:57 +0100 Subject: [PATCH 22/24] Update upgrade --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index dce88f2..89dd399 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,10 +137,10 @@ ynh_script_progression --message="Building app..." pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cleanall + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn migrate + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run rebuild + ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate popd #================================================= From a131e00dde8000abed64fd11b9e156bfc6a37517 Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:31:40 +0100 Subject: [PATCH 23/24] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 89dd399..33926a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,7 +137,6 @@ ynh_script_progression --message="Building app..." pushd "$final_path" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run clean-all ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run rebuild ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run migrate From e30893e8891e4d00f731f43b497a899b7757586d Mon Sep 17 00:00:00 2001 From: oufmilo <44617467+oufmilo@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:52:55 +0100 Subject: [PATCH 24/24] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index 616d563..2b708ad 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -Environment="PATH=__ENV_PATH__" +Environment="__YNH_NODE_LOAD_PATH__" Environment="NODE_ENV=production" ExecStart=__YNH_NPM__ start TimeoutSec=60