Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down
18 changes: 9 additions & 9 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]

Expand All @@ -55,6 +58,3 @@ ram.runtime = "150M"

[resources.permissions]
main.url = "/"

[resources.nodejs]
version = "22"
11 changes: 0 additions & 11 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 1 addition & 11 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
#=================================================
Expand Down