mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
be2806ee9e
- secure remove (only remove things if we did add the thing ) - switch to ynh_replace_string for some stuff (instead of templates, discouraged) - extract some part pour restore script
23 lines
758 B
Bash
23 lines
758 B
Bash
#!/bin/bash
|
|
pushd $final_path/diaspora
|
|
# here we *absolutely* need bash (not dash) because dash does not understand what rvm puts in .profile
|
|
# (wtf rvm for assuming everybody uses bash as default shell??)
|
|
# we also need a login shell to make sure .profile is loaded
|
|
sudo -u $app /bin/bash --login << EOF
|
|
rvm use --default 2.4
|
|
rvm 2.4 do gem install bundler:1.17.3
|
|
script/configure_bundler
|
|
bin/bundle install --full-index --with=postgresql
|
|
EOF
|
|
sudo -u $app /bin/bash --login << EOF
|
|
RAILS_ENV=production bundle exec rake db:migrate
|
|
EOF
|
|
|
|
#=================================================
|
|
# ASSETS PRECOMPILATION
|
|
#=================================================
|
|
sudo -u $app /bin/bash --login << EOF
|
|
RAILS_ENV=production bin/rake assets:precompile
|
|
EOF
|
|
popd
|
|
|