diff options
| author | anmol <github@datamol.org> | 2019-01-07 15:49:16 +0530 |
|---|---|---|
| committer | anmol <github@datamol.org> | 2019-01-07 15:49:16 +0530 |
| commit | 2604054b963ff0d70f20f532cf4767fe2ae25f87 (patch) | |
| tree | da424c647484771db1bc9150e9cb6099bdb2df1e | |
| parent | 880386bf2f19992b75c6d53df004a3ed42b1f7f5 (diff) | |
| download | mastodon_ynh-2604054b963ff0d70f20f532cf4767fe2ae25f87.tar.gz mastodon_ynh-2604054b963ff0d70f20f532cf4767fe2ae25f87.tar.bz2 mastodon_ynh-2604054b963ff0d70f20f532cf4767fe2ae25f87.zip | |
Mastodon require ruby-build <2.6.0
| -rw-r--r-- | scripts/install | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/scripts/install b/scripts/install index 4af30b4..0789620 100644 --- a/scripts/install +++ b/scripts/install @@ -208,33 +208,16 @@ ynh_replace_string "#SMTP_OPENSSL_VERIFY_MODE=peer" "SMTP_OPENSSL_V # Give right permission for the app chown -R "$app": "$final_path" -# Install ruby 2.5.1 ( - exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.3 || true - exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.3 || true - exec_as "$app" $final_path/.rbenv/versions/2.5.3/bin/ruby -v -) - -# Create symlink for ruby -rm /usr/bin/ruby || true -ln -s $final_path/.rbenv/versions/2.5.3/bin/ruby /usr/bin/ruby || true - -# 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 + cd "$final_path/live" + su mastodon <<INSTALL + $final_path/.rbenv/versions/2.5.3/bin/gem install bundler + $final_path/.rbenv/versions/2.5.3/bin/bundle install --deployment --force --without development test + yarn install --production --no-progress --non-interactive --silent + 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 +INSTALL ) #================================================= |
