diff options
| author | yalh76 <yalh@yahoo.com> | 2021-04-10 00:21:22 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2021-04-10 00:21:22 +0200 |
| commit | d5c6970fafd35955d1f6ea695d8e195c64419620 (patch) | |
| tree | c197f56ee4427e6ac4405e3dbf299c22982606a8 /scripts/upgrade | |
| parent | f376290f1397f56e8d12bad5d15ac952fbdc25c6 (diff) | |
| parent | 2e9f19e75a4b047702fcab3c2b0325ee03e97045 (diff) | |
| download | mastodon_ynh-d5c6970fafd35955d1f6ea695d8e195c64419620.tar.gz mastodon_ynh-d5c6970fafd35955d1f6ea695d8e195c64419620.tar.bz2 mastodon_ynh-d5c6970fafd35955d1f6ea695d8e195c64419620.zip | |
Merge branch 'testing' into example
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index c2c0819..b4c16e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -195,10 +195,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_nodejs --nodejs_version=$NODEJS_VERSION 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_ruby --ruby_version=$RUBY_VERSION #================================================= # SPECIFIC UPGRADE @@ -223,10 +223,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 --no-document popd #================================================= @@ -246,15 +246,15 @@ ynh_script_progression --message="Upgrading Mastodon..." chown -R "$app": "$final_path" pushd "$final_path/live" + sudo -u $app $ynh_ruby_load_path bin/bundle config deployment 'true' + sudo -u $app $ynh_ruby_load_path bin/bundle config without 'development test' + sudo -u $app $ynh_ruby_load_path bin/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 bin/bundle exec rails assets:clean + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails assets:precompile + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/bundle exec rails db:migrate + sudo -u $app RAILS_ENV=production $ynh_ruby_load_path bin/tootctl cache clear popd #================================================= @@ -290,7 +290,7 @@ yunohost service add "$app-streaming" --description="$app streaming service" #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on tcp" +ynh_systemd_action --service_name=${app}-web --action="start" --log_path=systemd --line_match="Listening on" ynh_systemd_action --service_name=${app}-sidekiq --action="start" --log_path=systemd --line_match="Schedules Loaded" ynh_systemd_action --service_name=${app}-streaming --action="start" --log_path=systemd --line_match="Worker 1 now listening" |
