Created
December 24, 2018 01:51
-
-
Save momoseijin/448db9e93f1611ca04f69a5fd0fac3cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#いつものごとくMastodonを一旦止める | |
systemctl stop mastodon-{web,sidekiq,streaming}.service | |
#リリースノートに書いてある Node.js 8 を入れる | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt update && sudo apt install nodejs | |
#リリースノートに書いてある nginx のサイズを上げる | |
nano /etc/nginx/sites-available/example.com.conf | |
↑この場所は各自設置しているファイルの場所を指定 | |
その中の真ん中のほうに client_max_body_size があるので 40m 以上にする | |
#ここからはほぼいつも通りに、Mastodonユーザになって作業 | |
sudo su - mastodon | |
cd ~/live | |
git fetch | |
git stash | |
git tag | |
git checkout v2.5.0 | |
git stash pop | |
#git branchでチェック | |
git branch | |
#こんな表示になる | |
$ git branch | |
* (detached from v2.5.0) | |
master | |
#bundle と yarn まではする | |
gem install bundler | |
bundle install --deployment --without development test | |
yarn install --pure-lockfile | |
#ここで今回のアップデートに必要な作業、時間かかる | |
SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate | |
RAILS_ENV=production bundle exec rails assets:precompile | |
#rootに戻って、一度 Mastodon を再起動 | |
systemctl restart mastodon-{web,sidekiq,streaming}.service | |
#この時点でサイトを見ると v2.5.0 になっている | |
#再度、Mastodon を止めて最後の作業の db:migrate をする | |
systemctl stop mastodon-{web,sidekiq,streaming}.service | |
sudo su - mastodon | |
cd ~/live | |
RAILS_ENV=production bundle exec rails db:migrate | |
# root に戻って Mastodon を再起動 | |
systemctl restart mastodon-{web,sidekiq,streaming}.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment