Last active
April 4, 2025 10:39
-
-
Save farrokhi/cbe56cb7923dca6fdf41c7f79e9edd92 to your computer and use it in GitHub Desktop.
Upgrade mastodon via git
This file contains 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
# as root | |
systemctl stop mastodon-web mastodon-sidekiq mastodon-streaming | |
su - mastodon | |
cd live | |
# as mastodon user, in its live direcotry | |
export MASTODON_VER=v4.3.7 | |
export RAILS_ENV=production | |
git fetch && git checkout ${MASTODON_VER} | |
bundle install | |
yarn install | |
bundle exec rails db:migrate | |
bundle exec rails assets:precompile | |
exit | |
# assuming you are root now | |
systemctl start mastodon-web mastodon-sidekiq mastodon-streaming | |
### You might need to install / update ruby, if you run into errors like | |
### rbenv: version `x.x.x' is not installed (set by /home/mastodon/live/.ruby-version) | |
### Then: | |
git -C /home/mastodon/.rbenv/plugins/ruby-build pull | |
export RUBY_CONFIGURE_OPTS=--with-jemalloc | |
rbenv install x.x.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment