mastodon アップデート(ubuntu20.04) 殴り書き

#サービス停止
systemctl stop mastodon-*

#ユーザー切り替え
su - mastodon

#フォルダ移動
cd live

#最新バージョンを取得
 git fetch --tags origin

# 取得したら目的のタグに切り換える。
git checkout v4.0.x

#bundlerでgem等を更新
bundle install

#yarnでフロントエンド周辺を更新
yarn install

# DBの構成変更がある場合はdb:migrateを実行する(何も無い場合も実行しても何も起こらない)
RAILS_ENV=production bundle exec rake db:migrate

# フロントエンドのCSSやJSの更新とパッケージング(これがチョット長い)
RAILS_ENV=production bundle exec rake assets:precompile

#rootユーザーに戻る
exit

#各種サービスの開始
systemctl start mastodon-web
systemctl start mastodon-sidekiq
systemctl start mastodon-streaming 
#mastodon-streamではエラーになるので注意

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です