Skip to content

Instantly share code, notes, and snippets.

@momoseijin
Last active May 15, 2020 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save momoseijin/3bc362f5153ed6dfa7f7f60cdbdc6f2a to your computer and use it in GitHub Desktop.
Save momoseijin/3bc362f5153ed6dfa7f7f60cdbdc6f2a to your computer and use it in GitHub Desktop.
Update from Mastodon v3.0.1 to v3.1.0
#まずさっきの Yarn の設定をして、キーを更新して全体のアプデは終わらせておく
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt upgrade -y
#リリースノートにある Node の 10 入れる
curl -sL https://deb.nodesource.com/setup_10.x | bash -
sudo apt update
sudo apt install nodejs
#Mastodon を止める
systemctl stop mastodon-{web,sidekiq,streaming}.service
#あとはいつものように Mastodon ユーザに移って進めていく
sudo su - mastodon
#Mastodon のディレクトリに行って v3.1.0 をもってくる
cd ~/live
git fetch
git tag
git checkout v3.1.0
#git branch で念のためチェックして
git branch
#こんな表示になる
$ git branch
* (detached from v3.1.0)
master
#いつもの作業
bundle install --deployment --without development test
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rails db:migrate
RAILS_ENV=production bundle exec rails assets:precompile
#終わったら root へ戻ってリスタート
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