diff options
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index 2c27ab6..6035d48 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -35,7 +35,7 @@ sudo sed -i "s@__FINALPATH__@$final_path@g" ../conf/nginx.conf* sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Stop Mastodon Services -sudo systemctl stop mastodon-*.service +sudo systemctl stop mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service # Change owner of live folder sudo chown -R $app: $final_path/live @@ -65,7 +65,7 @@ if [[ $node_version =~ ^v4.*$ ]]; then fi # add additional package for upgrade -ynh_package_install yarn pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-9.4 +ynh_package_install yarn pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-all # Install ruby 2.5.1 for release 2.4.0 sudo su - $app <<RCOMMANDS @@ -84,10 +84,8 @@ sudo su - $app <<MCOMMANDS pushd ~/live $final_path/.rbenv/versions/2.5.1/bin/gem install bundler $final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test -#yarn install --pure-lockfile MCOMMANDS -# Install package with yarn and restart postgresql pushd $final_path/live yarn install --pure-lockfile systemctl restart postgresql @@ -97,6 +95,7 @@ popd pushd $final_path/live RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails assets:clean RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails assets:precompile --trace +popd sudo su - $app <<UCOMMANDS pushd ~/live @@ -106,7 +105,7 @@ RAILS_ENV=production $final_path/.rbenv/versions/2.5.1/bin/bundle exec rails mas UCOMMANDS # Restart Mastodon -sudo systemctl start mastodon-*.service +sudo systemctl start mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service # Waiting start all services sleep 30 |
