mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Use of rbenv 2.6.0
This commit is contained in:
parent
6a0aab6a93
commit
dd867100d0
4 changed files with 10 additions and 9 deletions
|
@ -8,7 +8,7 @@
|
|||
WorkingDirectory=__FINALPATH__/live
|
||||
Environment="RAILS_ENV=production"
|
||||
Environment="DB_POOL=20"
|
||||
ExecStart=__FINALPATH__/live/bin/bundle exec sidekiq -c 20 -q default -q mailers -q pull -q push
|
||||
ExecStart=__FINALPATH__/.rbenv/versions/2.6.0/bin/bundle exec sidekiq -c 20 -q default -q mailers -q pull -q push
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
WorkingDirectory=__FINALPATH__/live
|
||||
Environment="RAILS_ENV=production"
|
||||
Environment="PORT=__PORT_WEB__"
|
||||
ExecStart=__FINALPATH__/live/bin/bundle exec puma -C config/puma.rb
|
||||
ExecStart=__FINALPATH__/.rbenv/versions/2.6.0/bin/bundle exec puma -C config/puma.rb
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ ynh_setup_source "$final_path/.rbenv/plugins/ruby-build" "app-ruby-build"
|
|||
|
||||
chown -R "$app": "$final_path"
|
||||
|
||||
# Install ruby 2.5.1
|
||||
# Install ruby 2.6.0
|
||||
(
|
||||
exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.6.0 || true
|
||||
exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.6.0 || true
|
||||
|
|
Loading…
Add table
Reference in a new issue