Mastodon 大版本更新,需要先 migrate database:
docker-compose run --rm web RAILS_ENV=production bundle exec rails db:migrate
軟體開發、伺服器和生活瑣事
Mastodon 大版本更新,需要先 migrate database:
docker-compose run --rm web RAILS_ENV=production bundle exec rails db:migrate
先 docker exec 進入 web server,然後執行:
RAILS_ENV=production tootctl cache clear RAILS_ENV=production tootctl media remove
reference: How to intelligently clear the cache?
# 重建 media # @see: https://docs.joinmastodon.org/admin/tootctl/#media-refresh RAILS_ENV=production tootctl media refresh --domain 'other.site.social' --verbose # 重建帳號相關檔案 # @see: https://docs.joinmastodon.org/admin/tootctl/#accounts-refresh RAILS_ENV=production tootctl accounts refresh --all --verbose
Reference
以下是 Mastdodon v4.0.2 在 Linux 上的安裝步驟。不同版本可能會有一些差異,請自行調整。
若沒有特別需求,Mastodon 也可以透過代理商安裝、運行,不必自行架設伺服器。
我自己是在 Raspberry Pi 4 上測試的,Pi 4 跑得起來只是比較慢了一些,若你的硬體配備比 Pi 4 好的話,其實沒什麼需要擔心的。
