diff --git a/conf/nginx.conf b/conf/nginx.conf index 28ce3d2..2b96867 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location __PATH__/ { # Path to source - alias __INSTALL_DIR__/dist/; + alias __INSTALL_DIR__/; index index.html; try_files $uri $uri/ /index.html; @@ -64,6 +64,15 @@ location __PATH__/ { expires 1y; more_set_headers "Cache-Control: public, immutable"; } + + # Make all app workers load + location ~* \.mjs$ { + # target only *.mjs files - we can safely override types since + # we are only targeting a single file extension. + types { + text/javascript mjs; + } + } # Security headers more_set_headers "X-Frame-Options: SAMEORIGIN always"; diff --git a/manifest.toml b/manifest.toml index f1720b4..c83ec38 100644 --- a/manifest.toml +++ b/manifest.toml @@ -26,8 +26,8 @@ multi_instance = true ldap = false sso = false -disk = "2000M" -ram.build = "3000M" +disk = "250M" +ram.build = "0M" ram.runtime = "150M" [install] @@ -43,10 +43,13 @@ ram.runtime = "150M" [resources.sources] [resources.sources.main] - url = "https://github.com/alam00000/bentopdf/archive/refs/tags/v2.7.0.tar.gz" - sha256 = "c24a1b1d916c5003559bde1d64b8d7b8fc27b294a1fc3a644809333ea88e1f9d" - - autoupdate.strategy = "latest_github_tag" + url = "https://github.com/alam00000/bentopdf/releases/download/v2.8.2/dist-simple-2.8.2.zip" + sha256 = "40aa4de1030c71c762df305cd9cddc3c0d2d91161b3a52c361e9d006b7cbc752" + format = "zip" + extract = true + in_subdir = false + autoupdate.strategy = "latest_github_release" + autoupdate.asset = "dist-simple-*.zip" [resources.system_user] @@ -55,6 +58,3 @@ ram.runtime = "150M" [resources.permissions] main.url = "/" - - [resources.nodejs] - version = "22" diff --git a/scripts/install b/scripts/install index 7a56f17..cc414ce 100755 --- a/scripts/install +++ b/scripts/install @@ -22,18 +22,7 @@ ynh_script_progression "Adding system configurations related to $app..." # Create a dedicated NGINX config using the conf/nginx.conf template ynh_config_add_nginx -#================================================= -# INSTALL BENTOPDF -#================================================= -ynh_script_progression "Installing the app..." - -pushd "$install_dir" - ynh_hide_warnings ynh_exec_as_app npm install - ynh_hide_warnings ynh_exec_as_app SIMPLE_MODE=true npm run build -popd - #================================================= # END OF SCRIPT #================================================= - ynh_script_progression "Installation of $app completed" diff --git a/scripts/upgrade b/scripts/upgrade index dfa717f..49c9122 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,7 +11,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Upgrading source files..." -ynh_setup_source --dest_dir="$install_dir" --full_replace +ynh_setup_source --dest_dir="$install_dir" --full_replace --keep="config.json" #================================================= # REAPPLY SYSTEM CONFIGURATION @@ -20,16 +20,6 @@ ynh_script_progression "Upgrading system configurations related to $app..." ynh_config_add_nginx -#================================================= -# INSTALL BENTOPDF -#================================================= -ynh_script_progression "Installing the app..." - -pushd "$install_dir" - ynh_hide_warnings ynh_exec_as_app npm install - ynh_hide_warnings ynh_exec_as_app SIMPLE_MODE=true npm run build -popd - #================================================= # END OF SCRIPT #=================================================