aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authorTagadda <36127788+Tagadda@users.noreply.github.com>2025-08-29 21:49:53 +0200
committerTagadda <36127788+Tagadda@users.noreply.github.com>2025-08-29 21:49:53 +0200
commite7f213118d206195f430e5cee0d4c58336410837 (patch)
tree33c3ad87bc2e2c1e8c3f1d882b8a4d34a634043f /scripts/install
parent3d53d933d5a0c50208494f754f4325fc8e333949 (diff)
downloadmastodon_ynh-e7f213118d206195f430e5cee0d4c58336410837.tar.gz
mastodon_ynh-e7f213118d206195f430e5cee0d4c58336410837.tar.bz2
mastodon_ynh-e7f213118d206195f430e5cee0d4c58336410837.zip
fix: LD_PRELOAD with a proper value
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/install b/scripts/install
index 7e400d5..22d297f 100644
--- a/scripts/install
+++ b/scripts/install
@@ -80,19 +80,19 @@ ynh_script_progression "Building app..."
pushd "$install_dir/live"
gem update --system
gem install bundler --no-document
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config deployment 'true'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config without 'development test'
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle config set force_ruby_platform true --quiet
- ynh_hide_warnings ynh_exec_as_app $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
+ ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true'
+ ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test'
+ ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet
+ ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
env corepack enable
- echo Y | ynh_hide_warnings ynh_exec_as_app yarn workspaces focus --production
- ynh_hide_warnings ynh_exec_as_app yarn install --immutable
+ echo Y | ynh_exec_as_app yarn workspaces focus --production
+ ynh_exec_as_app yarn install --immutable
echo "SAFETY_ASSURED=1">> $config
# Generate vapid keys
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails mastodon:webpush:generate_vapid_key > vapid_key.txt
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails mastodon:webpush:generate_vapid_key > vapid_key.txt
# Generate active record encryption
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:encryption:init > active_record_encryption.txt
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:encryption:init > active_record_encryption.txt
popd
# Re-generate config with vapid keys and active record encryption
@@ -112,12 +112,12 @@ ynh_delete_file_checksum "$config"
ynh_config_add --template=".env.production.sample" --destination="$config"
pushd "$install_dir/live"
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:migrate --quiet
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails db:seed --quiet
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/bundle exec rails assets:precompile --quiet
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:seed --quiet
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails assets:precompile --quiet
# Create the first admin user
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner
- ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production $ld_preload bin/tootctl accounts approve "$admin"
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner
+ ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts approve "$admin"
popd
#=================================================