Created
January 23, 2019 14:08
-
-
Save momoseijin/cb74f7e2d24f7499d73d1dc7d3ec9175 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 | |
#Mastodon ユーザになる | |
sudo su - mastodon | |
#今回の Ruby 2.6.0 のアップデートをするためにrbenvのおいてあるディレクトリに移り最新版をダウンロード | |
cd ~/.rbenv | |
git pull | |
#同じようにプラグインのディレクトリに移り最新版をダウンロード | |
cd ~/.rbenv/plugins/ruby-build | |
git pull | |
#rbenv のディレクトリに戻り rbenv から Ruby を 2.6.0 へ | |
cd ~/.rbenv | |
rbenv install 2.6.0 | |
rbenv global 2.6.0 | |
rbenv rehash | |
#Mastodon のディレクトリに戻って v2.7.0 をもってくる | |
cd ~/live | |
git fetch | |
git tag | |
git checkout v2.7.0 | |
#git branchでチェック | |
git branch | |
#こんな表示になる | |
$ git branch | |
* (detached from v2.7.0) | |
master | |
#今回の gem のアップデートをする | |
gem update --system | |
#bundle と yarn まではする | |
bundle install --deployment --without development test | |
yarn install --pure-lockfile | |
#今回やらないといけない SKIP_POST_DEPLOYMENT_MIGRATIONS=true をする、時間かかる | |
SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate | |
RAILS_ENV=production bundle exec rails assets:precompile | |
#ここで root に戻って、一回 Mastodon をリスタートして立ち上がるか確認 | |
exit | |
systemctl restart mastodon-{web,sidekiq,streaming}.service | |
#再度 Mastodon を止める | |
systemctl stop mastodon-{web,sidekiq,streaming}.service | |
#Mastodon ユーザになる | |
sudo su - mastodon | |
cd ~/live | |
#最後の処理で db:migrate する | |
RAILS_ENV=production bundle exec rails db:migrate | |
#root に戻って、Mastodon をリスタートして無事立ち上がれば終了 | |
exit | |
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