diff options
| author | yalh76 <yalh@yahoo.com> | 2021-03-06 01:10:38 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2021-03-06 01:10:38 +0100 |
| commit | 5ce2a24649e12a087ce2a424d418262b1425ffb5 (patch) | |
| tree | 0fa0cbd72a0d25502f6308e30923fdc437ad28be /scripts/upgrade | |
| parent | 1d258ddb722f29159e506c1c4fd8a8bc052afe89 (diff) | |
| download | mastodon_ynh-5ce2a24649e12a087ce2a424d418262b1425ffb5.tar.gz mastodon_ynh-5ce2a24649e12a087ce2a424d418262b1425ffb5.tar.bz2 mastodon_ynh-5ce2a24649e12a087ce2a424d418262b1425ffb5.zip | |
ynh_ruby_3
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index bbbe50b..27aaff0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -184,10 +184,10 @@ ynh_add_nginx_config 'port_web port_stream' #================================================= ynh_script_progression --message="Upgrading dependencies..." -ynh_remove_nodejs -ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_app_dependencies $pkg_dependencies ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" +ynh_install_nodejs --nodejs_version=$NODEJS_VERSION +ynh_install_ruby --ruby_version=$RUBY_VERSION #================================================= # CREATE DEDICATED USER @@ -220,10 +220,10 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Installing Ruby..." -ynh_install_ruby --ruby_version=$RUBY_VERSION pushd "$final_path/live" - gem update --system - gem install bundler:$BUNDLER_VERSION --no-document + ynh_use_ruby + $ynh_gem update --system + $ynh_gem install bundler:$BUNDLER_VERSION --no-document popd #================================================= @@ -243,15 +243,15 @@ ynh_script_progression --message="Upgrading Mastodon..." chown -R "$app": "$final_path" pushd "$final_path/live" + sudo -u $app $ynh_ruby_load_path $ruby_path/bundle config deployment 'true' + sudo -u $app $ynh_ruby_load_path $ruby_path/bundle config without 'development test' + sudo -u $app $ynh_ruby_load_path $ruby_path/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_use_nodejs - sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config deployment 'true' - sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config without 'development test' - sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) - sudo -u $app PATH=$PATH yarn install --pure-lockfile - sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:clean - sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:precompile - sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails db:migrate - sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl cache clear + sudo -u $app $ynh_node_load_PATH yarn install --pure-lockfile + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails assets:clean + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails assets:precompile + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/bundle exec rails db:migrate + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path $ruby_path/tootctl cache clear popd #================================================= |
