aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authoreric_G <46165813+ericgaspar@users.noreply.github.com>2025-09-01 13:58:37 +0200
committerGitHub <noreply@github.com>2025-09-01 13:58:37 +0200
commitfb1a1d63c17a23264c3ea1207e6b1ead0415984a (patch)
tree50fad3e6c05cfb27c2c3866200756283f1de6113 /scripts/install
parentedbf9871a19fd30634d86e7ff41d4f33b92521d4 (diff)
parentf5bf5ea6628be0fa889f8a4dda97dcb19a427ec7 (diff)
downloadmastodon_ynh-fb1a1d63c17a23264c3ea1207e6b1ead0415984a.tar.gz
mastodon_ynh-fb1a1d63c17a23264c3ea1207e6b1ead0415984a.tar.bz2
mastodon_ynh-fb1a1d63c17a23264c3ea1207e6b1ead0415984a.zip
Merge pull request #518 from YunoHost-Apps/ldpreload
LD_PRELOAD
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..ddb0692 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_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config deployment 'true'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config without 'development test'
+ ynh_hide_warnings ynh_exec_as_app LD_PRELOAD=libjemalloc.so bin/bundle config set force_ruby_platform true --quiet
+ ynh_hide_warnings 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_hide_warnings 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_hide_warnings 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_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:migrate --quiet
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/bundle exec rails db:seed --quiet
+ ynh_hide_warnings 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_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner
+ ynh_hide_warnings ynh_exec_as_app RAILS_ENV=production LD_PRELOAD=libjemalloc.so bin/tootctl accounts approve "$admin"
popd
#=================================================