1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Use jemalloc memory allocator as recommended by Discourse team

This commit is contained in:
Jimmy Monin 2018-05-19 09:13:36 +02:00
parent c8ed3c3c06
commit 5be413e2dd
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,7 @@
# Common variables # Common variables
# #
pkg_dependencies="zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev checkinstall libxml2-dev vim imagemagick postgresql postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle" pkg_dependencies="libjemalloc1 libjemalloc-dev zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev checkinstall libxml2-dev vim imagemagick postgresql postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle"
RUBY_VERSION="2.4.4" RUBY_VERSION="2.4.4"
# Execute a command as another user with login # Execute a command as another user with login
@ -457,7 +457,7 @@ ynh_install_ruby () {
test -x /usr/bin/ruby_rbenv && mv /usr/bin/ruby_rbenv /usr/bin/ruby test -x /usr/bin/ruby_rbenv && mv /usr/bin/ruby_rbenv /usr/bin/ruby
# Install the requested version of ruby # Install the requested version of ruby
CONFIGURE_OPTS="--disable-install-doc" MAKE_OPTS="-j2" rbenv install --skip-existing $ruby_version CONFIGURE_OPTS="--disable-install-doc --with-jemalloc" MAKE_OPTS="-j2" rbenv install --skip-existing $ruby_version
# Store the ID of this app and the version of ruby requested for it # Store the ID of this app and the version of ruby requested for it
echo "$YNH_APP_ID:$ruby_version" | tee --append "$rbenv_install_dir/ynh_app_version" echo "$YNH_APP_ID:$ruby_version" | tee --append "$rbenv_install_dir/ynh_app_version"

View file

@ -274,6 +274,7 @@ else
fi fi
ynh_replace_string "__ADDITIONAL_ENV__" "$additional_env" "../conf/systemd.service" ynh_replace_string "__ADDITIONAL_ENV__" "$additional_env" "../conf/systemd.service"
ynh_replace_string "__LIBJEMALLOC__" "$(ldconfig -p | grep libjemalloc | awk 'END {print $NF}')" "../conf/systemd.service"
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================