diff --git a/conf/cron b/conf/cron index 6463d70..9a984a3 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ RAILS_ENV=production -@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.1/bin/bundle exec rake __USER__:media:remove_remote +@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.5/bin/bundle exec rake __USER__:media:remove_remote diff --git a/conf/mastodon-sidekiq.service b/conf/mastodon-sidekiq.service index cd7db81..d5fc7e1 100644 --- a/conf/mastodon-sidekiq.service +++ b/conf/mastodon-sidekiq.service @@ -9,7 +9,7 @@ Environment="RAILS_ENV=production" Environment="DB_POOL=25" Environment="MALLOC_ARENA_MAX=2" - ExecStart=/opt/rbenv/versions/2.6.1/bin/bundle exec sidekiq -c 25 + ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec sidekiq -c 25 TimeoutSec=15 Restart=always StandardError=syslog diff --git a/conf/mastodon-web.service b/conf/mastodon-web.service index d2f5fdd..bb65afe 100644 --- a/conf/mastodon-web.service +++ b/conf/mastodon-web.service @@ -8,7 +8,7 @@ WorkingDirectory=__FINALPATH__/live Environment="RAILS_ENV=production" Environment="PORT=__PORT_WEB__" - ExecStart=/opt/rbenv/versions/2.6.1/bin/bundle exec puma -C config/puma.rb + ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always diff --git a/scripts/install b/scripts/install index 1810c9b..311ea59 100644 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_install_ruby +source ynh_install_ruby__2 source ynh_add_extra_apt_repos__3 source ynh_send_readme_to_admin__2 source ynh_add_swap @@ -146,9 +146,9 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Installing Ruby..." --weight=424 -ynh_install_ruby --ruby_version=2.6.1 -/opt/rbenv/versions/2.6.1/bin/gem update --system -#/opt/rbenv/versions/2.6.1/bin/gem install bundler --no-document +ynh_install_ruby --ruby_version=2.6.5 +/opt/rbenv/versions/2.6.5/bin/gem update --system +#/opt/rbenv/versions/2.6.5/bin/gem install bundler --no-document #================================================= # MODIFY A CONFIG FILE @@ -186,12 +186,12 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.1/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test + sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.5/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile sudo -u "$app" echo "SAFETY_ASSURED=1">> .env.production - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rails db:migrate --quiet - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rails assets:precompile --quiet - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails db:migrate --quiet + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:precompile --quiet + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > acc.txt popd diff --git a/scripts/remove b/scripts/remove index f482ffe..3db3310 100644 --- a/scripts/remove +++ b/scripts/remove @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_install_ruby +source ynh_install_ruby__2 source ynh_add_extra_apt_repos__3 source ynh_add_swap source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index 1d8180d..689f5c2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -8,7 +8,7 @@ #Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh -source ../settings/scripts/ynh_install_ruby +source ../settings/scripts/ynh_install_ruby__2 source ../settings/scripts/ynh_add_extra_apt_repos__3 source ../settings/scripts/ynh_add_swap source ../settings/scripts/ynh_check_ram @@ -112,8 +112,8 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st #================================================= ynh_script_progression --message="Installing Ruby..." --weight=393 -ynh_install_ruby --ruby_version=2.6.1 -/opt/rbenv/versions/2.6.1/bin/gem update --system +ynh_install_ruby --ruby_version=2.6.5 +/opt/rbenv/versions/2.6.5/bin/gem update --system #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index b35d643..563b983 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,7 @@ #================================================= source _common.sh -source ynh_install_ruby +source ynh_install_ruby__2 source ynh_add_extra_apt_repos__3 source ynh_add_swap source ynh_check_ram @@ -228,9 +228,9 @@ ynh_add_swap --size=$swap_needed #================================================= ynh_script_progression --message="Installing Ruby..." --weight=424 -ynh_install_ruby --ruby_version=2.6.1 -/opt/rbenv/versions/2.6.1/bin/gem update --system -#/opt/rbenv/versions/2.6.1/bin/gem install bundler +ynh_install_ruby --ruby_version=2.6.5 +/opt/rbenv/versions/2.6.5/bin/gem update --system +#/opt/rbenv/versions/2.6.5/bin/gem install bundler #================================================= # MODIFY A CONFIG FILE @@ -267,14 +267,14 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs if [ "$(lsb_release --codename --short)" == "jessie" ]; then - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.1/bin/bundle install --deployment --without development test + sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.5/bin/bundle install --deployment --without development test else - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.1/bin/bundle install --deployment --force --without development test + sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/2.6.5/bin/bundle install --deployment --force --without development test fi sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rails assets:clean - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rails assets:precompile - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.1/bin/bundle exec rails db:migrate + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:clean + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails assets:precompile + sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.5/bin/bundle exec rails db:migrate sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl cache clear popd diff --git a/scripts/ynh_install_ruby b/scripts/ynh_install_ruby__2 similarity index 94% rename from scripts/ynh_install_ruby rename to scripts/ynh_install_ruby__2 index 9e53c06..c08b5f4 100644 --- a/scripts/ynh_install_ruby +++ b/scripts/ynh_install_ruby__2 @@ -15,15 +15,15 @@ ynh_install_rbenv () { echo "Installation of rbenv - ruby version management" >&2 # Build an app.src for rbenv mkdir -p "../conf" - echo "SOURCE_URL=https://github.com/rbenv/rbenv/archive/v1.1.1.tar.gz -SOURCE_SUM=41f1a60714c55eceb21d692a469aee1ec4f46bba351d0dfcb0c660ff9cf1a1c9" > "../conf/rbenv.src" + echo "SOURCE_URL=https://github.com/rbenv/rbenv/archive/v1.1.2.tar.gz +SOURCE_SUM=80ad89ffe04c0b481503bd375f05c212bbc7d44ef5f5e649e0acdf25eba86736" > "../conf/rbenv.src" # Download and extract rbenv ynh_setup_source "$rbenv_install_dir" rbenv # Build an app.src for ruby-build mkdir -p "../conf" - echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20190314.tar.gz -SOURCE_SUM=2cc0f9fdb232042e71edad93a5c3ae108bcd090ea0b6db4e5bb6325547e07968" > "../conf/ruby-build.src" + echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20191004.tar.gz +SOURCE_SUM=6f053957acb0af6d621ebf2b9dacc9c265844b2dc6842a021eb10f0a70094fe8" > "../conf/ruby-build.src" # Download and extract ruby-build ynh_setup_source "$rbenv_install_dir/plugins/ruby-build" ruby-build