diff options
| author | nemsia <nemsia@nemsia.org> | 2018-05-31 13:38:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-31 13:38:55 +0200 |
| commit | 301df81c1e34e541e3dd6fcba5037d5744646747 (patch) | |
| tree | 6270f2ea2b6119815d8bbbbdb12bbdd99a94fd7f /scripts/upgrade | |
| parent | d720ad3db76c1560361105706bae2ea73832a4c3 (diff) | |
| download | mastodon_ynh-301df81c1e34e541e3dd6fcba5037d5744646747.tar.gz mastodon_ynh-301df81c1e34e541e3dd6fcba5037d5744646747.tar.bz2 mastodon_ynh-301df81c1e34e541e3dd6fcba5037d5744646747.zip | |
Ready to Debian Stretch (#22)
* Ready to Debian Stretch
* rb 2.5.1 on install
* Yarn install on root
* rails precompile fix
* Fix backup on stretch
* clean
* fix backup stretch
* Change systemd mastodon service restart
* Change systemd script for stretch
* Ready to mastodon 2.4.1
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 |
