お知らせ
現在サイトのリニューアル作業中のため、表示が崩れているページが存在することがあります。
ハマったので残しておく。
git remote -v
の状態が以下の通りで、origin/mainが本番運用ブランチ。
mastodon https://github.com/mastodon/mastodon.git (fetch)
mastodon https://github.com/mastodon/mastodon.git (push)
origin https://github.com/Lycolia/lycodon.git (fetch)
origin https://github.com/Lycolia/lycodon.git (push)
git checkout -b merge-latest
git fech mastodon
git merge mastodon/main
# swich user
sudo su - mastodon
# install
bundle install
yarn install
# DBがアカンことがあるので叩いておく
RAILS_ENV=production bundle exec rails db:migrate
# いつものリビルド
RAILS_ENV=production bundle exec rails assets:clobber
RAILS_ENV=production bundle exec rails assets:precompile
exit
# 再起動
sudo systemctl restart mastodon-web mastodon-sidekiq mastodon-streaming
git push
してGitHub上で自分のところのmainにマージする。デフォルトでは本家に向くので注意ジャーナルを見てエラー原因を特定する。新規要素がらみのパラメーターが出てたらDBが怪しいのでRAILS_ENV=production bundle exec rails db:migrate
で直る可能性がある。
sudo journalctl -u mastodon-web -f