aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
authoranmol <github@datamol.org>2019-01-22 12:13:13 +0530
committeranmol <github@datamol.org>2019-01-22 12:13:13 +0530
commitdd867100d01ac9afee2b6922eab2cc5253aeab93 (patch)
treeef9b307566a8e0ffc684a414d76b8a663b233118 /scripts/install
parent6a0aab6a93abc3a73fbef2e434bdf6279bd43122 (diff)
downloadmastodon_ynh-dd867100d01ac9afee2b6922eab2cc5253aeab93.tar.gz
mastodon_ynh-dd867100d01ac9afee2b6922eab2cc5253aeab93.tar.bz2
mastodon_ynh-dd867100d01ac9afee2b6922eab2cc5253aeab93.zip
Use of rbenv 2.6.0
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/install b/scripts/install
index 42d046a..54635e9 100644
--- a/scripts/install
+++ b/scripts/install
@@ -207,13 +207,14 @@ chown -R "$app": "$final_path"
cd "$final_path/live"
su mastodon <<INSTALL
$final_path/.rbenv/versions/2.6.0/bin/gem install bundler:1.16.6 --no-ri --no-rdoc
- $final_path/live/bin/bundle install \
+ $final_path/.rbenv/versions/2.6.0/bin/gem install bundler
+ $final_path/.rbenv/versions/2.6.0/bin/bundle install bundler \
-j$(getconf _NPROCESSORS_ONLN) \
--deployment --without development test
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
+ RAILS_ENV=production $final_path/.rbenv/versions/2.6.0/bin/bundle exec rails db:migrate --quiet
+ RAILS_ENV=production $final_path/.rbenv/versions/2.6.0/bin/bundle exec rails assets:precompile --quiet
INSTALL
)
@@ -234,13 +235,13 @@ systemctl start "$app-web.service" "$app-sidekiq.service" "$app-streaming.servic
(
cd "$final_path/live"
su mastodon <<CREATEUSER
-RAILS_ENV=production bin/bundle exec rails c
+RAILS_ENV=production $final_path/.rbenv/versions/2.6.0/bin/bundle exec rails c
account = Account.create!(username: '$admin_mastodon')
user = User.create!(email: '$admin_mastodon_mail', password: '$admin_pass', account: account)
CREATEUSER
su mastodon <<SETADMIN
-RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --confirm
-RAILS_ENV=production bin/tootctl accounts modify $admin_mastodon --role admin
+RAILS_ENV=production $final_path/.rbenv/versions/2.6.0/bin/tootctl accounts modify $admin_mastodon --confirm
+RAILS_ENV=production $final_path/.rbenv/versions/2.6.0/bin/tootctl accounts modify $admin_mastodon --role admin
SETADMIN
)