mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Mastodon require ruby-build <2.6.0
This commit is contained in:
parent
70884e56d4
commit
880386bf2f
1 changed files with 26 additions and 10 deletions
|
@ -208,17 +208,33 @@ ynh_replace_string "#SMTP_OPENSSL_VERIFY_MODE=peer" "SMTP_OPENSSL_V
|
||||||
# Give right permission for the app
|
# Give right permission for the app
|
||||||
chown -R "$app": "$final_path"
|
chown -R "$app": "$final_path"
|
||||||
|
|
||||||
|
# Install ruby 2.5.1
|
||||||
(
|
(
|
||||||
cd "$final_path/live"
|
exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.3 || true
|
||||||
su mastodon <<INSTALL
|
exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.3 || true
|
||||||
$final_path/.rbenv/versions/2.5.3/bin/gem install bundler
|
exec_as "$app" $final_path/.rbenv/versions/2.5.3/bin/ruby -v
|
||||||
$final_path/.rbenv/versions/2.5.3/bin/gem bundle update --bundler
|
)
|
||||||
$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test
|
|
||||||
yarn install --production --no-progress --non-interactive --silent
|
# Create symlink for ruby
|
||||||
echo "SAFETY_ASSURED=1">> .env.production
|
rm /usr/bin/ruby || true
|
||||||
RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
|
ln -s $final_path/.rbenv/versions/2.5.3/bin/ruby /usr/bin/ruby || true
|
||||||
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
|
|
||||||
INSTALL
|
# Preconfig CSS & JS
|
||||||
|
# Install Mastodon
|
||||||
|
(
|
||||||
|
sudo su - $app <<MCOMMANDS
|
||||||
|
pushd ~/live
|
||||||
|
$final_path/.rbenv/versions/2.5.3/bin/gem install bundler
|
||||||
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
|
$final_path/.rbenv/versions/2.5.3/bin/bundle install --deployment --without development test
|
||||||
|
else
|
||||||
|
$final_path/.rbenv/versions/2.5.3/bin/bundle install --deployment --force --without development test
|
||||||
|
fi
|
||||||
|
yarn install --pure-lockfile
|
||||||
|
echo "SAFETY_ASSURED=1">> .env.production
|
||||||
|
RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
|
||||||
|
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
|
||||||
|
MCOMMANDS
|
||||||
)
|
)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue