(Mastodon Upgrade): Difference between revisions

From Bgzashtita Official wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:


git fetch && git checkout v4.0.2
git fetch && git checkout v4.0.2
git -C /home/mastodon/.rbenv/plugins/ruby-build pull


bundle install
bundle install

Revision as of 06:29, 29 March 2025

sudo cp /var/lib/redis/dump.rdb /tmp/backup.rdb

sudo su - mastodon

pg_dump mastodon_production > /tmp/backup.psqld

cp live/.env.production /tmp/.env.production

sudo su - mastodon

cd live

RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4

rbenv global 3.0.4

git fetch && git checkout v4.0.2

git -C /home/mastodon/.rbenv/plugins/ruby-build pull


bundle install

yarn install

SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate


RAILS_ENV=production bundle exec rails assets:precompile " Ako ima greshka da se probva sus: NODE_OPTIONS=--openssl-legacy-provider RAILS_ENV=production bundle exec rails assets:precompile " https://github.com/mastodon/mastodon/issues/24141

exit

sudo systemctl restart 'mastodon*'

sudo su - mastodon

cd live && RAILS_ENV=production bundle exec rails db:migrate

exit

sudo systemctl restart 'mastodon*'

https://techbits.io/mastodon-4-upgrade/