diff options
| author | eric_G <46165813+ericgaspar@users.noreply.github.com> | 2025-09-24 22:57:50 +0200 |
|---|---|---|
| committer | eric_G <46165813+ericgaspar@users.noreply.github.com> | 2025-09-24 22:57:50 +0200 |
| commit | 192d0fa48372d1ac5a8f73947df2e8da5e5da54a (patch) | |
| tree | f825f7ad0b74e99700b0b273cdfc4f27ea3683f8 /scripts/install | |
| parent | f153dc5aa68f66d3fabe39baa54f7fcdad8e3ebf (diff) | |
| parent | fdc80e8c352611d3422a2b903840a25e5e277d01 (diff) | |
| download | mastodon_ynh-192d0fa48372d1ac5a8f73947df2e8da5e5da54a.tar.gz mastodon_ynh-192d0fa48372d1ac5a8f73947df2e8da5e5da54a.tar.bz2 mastodon_ynh-192d0fa48372d1ac5a8f73947df2e8da5e5da54a.zip | |
Merge branch 'testing' into pr/466
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 34 |
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 #================================================= |
