diff --git a/scripts/install b/scripts/install index 0aa7387..6499880 100644 --- a/scripts/install +++ b/scripts/install @@ -121,10 +121,10 @@ pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system ynh_gem install bundler --no-document - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config deployment 'true' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config without 'development test' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config set force_ruby_platform true - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config deployment 'true' + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config without 'development test' + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config set force_ruby_platform true + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) # Building assets ynh_use_nodejs @@ -132,13 +132,13 @@ pushd "$install_dir/live" # This export might be removed in yunohost 12 COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install echo "SAFETY_ASSURED=1">> "$config" - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:encryption:init + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:encryption:init --quiet ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet # Generate vapid keys - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt # Create the first admin user - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null popd # Re-generate config with vapid keys diff --git a/scripts/restore b/scripts/restore index d322f36..02f60cf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -62,7 +62,7 @@ pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system ynh_gem install bundler --no-document - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle install --redownload -j"$(nproc)" + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle install --redownload -j"$(nproc)" ynh_use_nodejs # This export might be removed in yunohost 12 diff --git a/scripts/upgrade b/scripts/upgrade index 6a36d68..70bdef5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,21 +101,21 @@ pushd "$install_dir/live" ynh_use_ruby ynh_gem update --system ynh_gem install bundler --no-document - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config deployment 'true' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config without 'development test' - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config set force_ruby_platform true --quiet - ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config deployment 'true' + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config without 'development test' + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle config set force_ruby_platform true --quiet + ynh_exec_as "$app" "$ynh_ruby_load_path" $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs # This export might be removed in yunohost 12 export COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable yarn install if [ -d "$install_dir/live/public/assets" ]; then - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:clean + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails assets:clean fi - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/tootctl cache clear + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails assets:precompile + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails db:migrate + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/tootctl cache clear popd #================================================= @@ -125,8 +125,8 @@ ynh_script_progression --message="Applying migrations..." --weight=1 pushd "$install_dir/live" ynh_use_ruby - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate - ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" "$ld_preload" bin/tootctl cache clear + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails db:migrate + ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$ynh_ruby_load_path" $ld_preload bin/tootctl cache clear popd #=================================================