diff options
| author | yalh76 <yalh@yahoo.com> | 2021-02-24 07:11:45 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2021-02-24 07:11:45 +0100 |
| commit | 9691d954dc29f8d3468b8de87d934d5954320871 (patch) | |
| tree | b80f8020f093182fd2fe49d42916ef35cc84362d /scripts | |
| parent | b2af9c3f5ec4be1fbd10a9f14e7889aefec6b081 (diff) | |
| download | mastodon_ynh-9691d954dc29f8d3468b8de87d934d5954320871.tar.gz mastodon_ynh-9691d954dc29f8d3468b8de87d934d5954320871.tar.bz2 mastodon_ynh-9691d954dc29f8d3468b8de87d934d5954320871.zip | |
RBENV_ROOT
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/install | 16 | ||||
| -rw-r--r-- | scripts/upgrade | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/scripts/install b/scripts/install index 368dcad..1447309 100644 --- a/scripts/install +++ b/scripts/install @@ -144,8 +144,8 @@ ynh_script_progression --message="Installing Ruby..." ynh_install_ruby --ruby_version=$RUBY_VERSION pushd "$final_path/live" - /opt/rbenv/versions/$app/bin/gem update --system - /opt/rbenv/versions/$app/bin/gem install bundler:$BUNDLER_VERSION --no-document + $RBENV_ROOT/versions/$app/bin/gem update --system + $RBENV_ROOT/versions/$app/bin/gem install bundler:$BUNDLER_VERSION --no-document popd #================================================= @@ -188,14 +188,14 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config deployment 'true' - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config without 'development test' - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config deployment 'true' + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config without 'development test' + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) sudo -u $app PATH=$PATH yarn install --pure-lockfile echo "SAFETY_ASSURED=1">> $config - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails db:setup --quiet - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:precompile --quiet - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails db:setup --quiet + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:precompile --quiet + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts modify "$admin" --approve popd diff --git a/scripts/upgrade b/scripts/upgrade index dcbe9b0..6f14af2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -262,13 +262,13 @@ chown -R "$app": "$final_path" pushd "$final_path/live" ynh_use_nodejs - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config deployment 'true' - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config without 'development test' - sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config deployment 'true' + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config without 'development test' + sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) sudo -u $app PATH=$PATH yarn install --pure-lockfile - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:clean - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:precompile - sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails db:migrate + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:clean + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:precompile + sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails db:migrate sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl cache clear popd |
