(Mastodon Upgrade)

From Bgzashtita Official wiki
Revision as of 22:05, 5 June 2023 by Unknown user (talk)
Jump to navigation Jump to search

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

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/