aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install34
1 files changed, 13 insertions, 21 deletions
diff --git a/scripts/install b/scripts/install
index 6efd8ef..ddff21c 100644
--- a/scripts/install
+++ b/scripts/install
@@ -8,14 +8,6 @@ admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
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
#=================================================
ynh_script_progression "Setting up source files..."
@@ -79,19 +71,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
@@ -111,12 +103,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
#=================================================