Merge pull request #519 from Thovi98/ruby-and-nodejs-resources

ruby and nodejs resources
This commit is contained in:
eric_G 2025-09-17 21:31:38 +02:00 committed by GitHub
commit 0e9ff7e7b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 24 additions and 30 deletions

View file

@ -87,3 +87,9 @@ ram.runtime = "500M"
[resources.database]
type = "postgresql"
[resources.nodejs]
version = "22"
[resources.ruby]
version = "3.4.5"

View file

@ -5,5 +5,21 @@
#=================================================
memory_needed="2560"
ruby_version="3.4.5"
nodejs_version="22"
case $YNH_ARCH in
amd64)
ld_preload="LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so"
;;
arm64)
ld_preload="LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so"
;;
armhf)
ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libjemalloc.so"
;;
armel)
ld_preload="LD_PRELOAD=/usr/lib/arm-linux-gnueabi/libjemalloc.so"
;;
i386)
ld_preload="LD_PRELOAD=/usr/lib/i386-linux-gnu/libjemalloc.so"
;;
esac

View file

@ -8,14 +8,6 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
# Set `service` settings to support `yunohost app shell` command
ynh_app_setting_set --key=service --value="$app-web.service"
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression "Installing Ruby and NodeJS..."
ynh_ruby_install
ynh_nodejs_install
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================

View file

@ -36,10 +36,6 @@ ynh_safe_rm "/etc/cron.d/$app"
# Remote logrotate config
ynh_config_remove_logrotate
# Remove metapackage and its dependencies
ynh_ruby_remove
ynh_nodejs_remove
# Remove swap
ynh_del_swap

View file

@ -37,14 +37,6 @@ ynh_script_progression "Adding $swap_needed Mo to swap..."
ynh_add_swap --size=$swap_needed
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
ynh_script_progression "Reinstalling Ruby and NodeJS..."
ynh_ruby_install
ynh_nodejs_install
#=================================================
# BUILD APP
#=================================================

View file

@ -46,14 +46,6 @@ fi
ynh_script_progression "Adding $swap_needed Mo to swap..."
ynh_add_swap --size=$swap_needed
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression "Upgrading Ruby and NodeJS..."
ynh_ruby_install
ynh_nodejs_install
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================