1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00

Bump ruby to 2.6.6

This commit is contained in:
yalh76 2020-04-07 17:06:28 +02:00
parent c31912b790
commit 69be8d685a
7 changed files with 22 additions and 20 deletions

View file

@ -12,6 +12,8 @@
setup_private=0
setup_public=1
upgrade=1
# 3.1.2
upgrade=1 from_commit=7e1f4c2dee5f2c8374686aea62f4648cdf2722c3
backup_restore=1
multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.

View file

@ -1,2 +1,2 @@
RAILS_ENV=production
@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.5/bin/bundle exec rake __USER__:media:remove_remote
@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.6/bin/bundle exec rake __USER__:media:remove_remote

View file

@ -9,7 +9,7 @@
Environment="RAILS_ENV=production"
Environment="DB_POOL=25"
Environment="MALLOC_ARENA_MAX=2"
ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec sidekiq -c 25
ExecStart=/opt/rbenv/versions/2.6.6/bin/bundle exec sidekiq -c 25
TimeoutSec=15
Restart=always
StandardError=syslog

View file

@ -8,7 +8,7 @@
WorkingDirectory=__FINALPATH__/live
Environment="RAILS_ENV=production"
Environment="PORT=__PORT_WEB__"
ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb
ExecStart=/opt/rbenv/versions/2.6.6/bin/bundle exec puma -C config/puma.rb
ExecReload=/bin/kill -SIGUSR1 $MAINPID
TimeoutSec=15
Restart=always

View file

@ -150,9 +150,9 @@ ynh_add_swap --size=$swap_needed
#=================================================
ynh_script_progression --message="Installing Ruby..." --weight=424
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:1.17.3 --no-document
ynh_install_ruby --ruby_version=2.6.6
/opt/rbenv/versions/2.6.6/bin/gem update --system
/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document
#=================================================
# MODIFY A CONFIG FILE
@ -190,12 +190,12 @@ chown -R "$app": "$final_path"
pushd "$final_path/live"
ynh_use_nodejs
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 /opt/rbenv/versions/2.6.6/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.5/bin/bundle exec rails db:setup --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 /opt/rbenv/versions/2.6.6/bin/bundle exec rails db:setup --quiet
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:precompile --quiet
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/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

View file

@ -114,9 +114,9 @@ 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.5
/opt/rbenv/versions/2.6.5/bin/gem update --system
/opt/rbenv/versions/2.6.5/bin/gem install bundler:1.17.3 --no-document
ynh_install_ruby --ruby_version=2.6.6
/opt/rbenv/versions/2.6.6/bin/gem update --system
/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document
#=================================================
# RESTORE THE POSTGRESQL DATABASE

View file

@ -244,9 +244,9 @@ ynh_add_swap --size=$swap_needed
#=================================================
ynh_script_progression --message="Installing Ruby..." --weight=424
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:1.17.3 --no-document
ynh_install_ruby --ruby_version=2.6.6
/opt/rbenv/versions/2.6.6/bin/gem update --system
/opt/rbenv/versions/2.6.6/bin/gem install bundler:1.17.3 --no-document
#=================================================
# MODIFY A CONFIG FILE
@ -282,11 +282,11 @@ chown -R "$app": "$final_path"
pushd "$final_path/live"
ynh_use_nodejs
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 /opt/rbenv/versions/2.6.6/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test
sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile
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 /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:clean
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails assets:precompile
sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.6/bin/bundle exec rails db:migrate
sudo -u "$app" env PATH=$PATH RAILS_ENV=production bin/tootctl cache clear
popd