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= diff --git a/conf/nginx.conf b/conf/nginx.conf index 6b738ce..32ad407 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,28 +1,25 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - # Path to source - alias __FINALPATH__/; + 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_redirect off; -### 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 + # 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; } 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..21c0482 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/", @@ -21,7 +21,7 @@ "requirements": { "yunohost": ">= 11.0.0" }, - "multi_instance": true, + "multi_instance": false, "services": [ "nginx" ], diff --git a/scripts/_common.sh b/scripts/_common.sh index f5aeb98..ffeb039 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,10 +6,10 @@ # PHP APP SPECIFIC #================================================= -NODEJS_VERSION="16.15.0" +NODEJS_VERSION="19" # dependencies used by the app -pkg_dependencies="ffmpeg postgresql" +pkg_dependencies="ffmpeg postgresql build-essential" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 32c0531..18c864e 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,13 @@ 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 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 + 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 popd #================================================= @@ -141,6 +148,7 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index dce88f2..33926a3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -137,10 +137,9 @@ 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 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 #=================================================