1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diaspora_ynh.git synced 2024-09-03 18:26:13 +02:00
diaspora_ynh/scripts/bundle_app

24 lines
605 B
Text
Raw Normal View History

#!/bin/bash
pushd $final_path/diaspora
echo 2.6.6 > .ruby-version # overwrite 2.4 default from diaspora because rbenv does not understand it
sudo -u $app --login << EOF
gem install bundler:1.17.3
cd diaspora
script/configure_bundler
bin/bundle install --full-index --with=postgresql
EOF
sudo -u $app --login << EOF
cd diaspora
RAILS_ENV=production bundle exec rake db:migrate
EOF
#=================================================
# ASSETS PRECOMPILATION
#=================================================
sudo -u $app --login << EOF
cd diaspora
RAILS_ENV=production bin/rake assets:precompile
EOF
popd