(Mastodon Upgrade): Difference between revisions
Jump to navigation
Jump to search
Created page with "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 e..." |
No edit summary |
||
| Line 4: | Line 4: | ||
pg_dump mastodon_production > /tmp/backup.psqld | pg_dump mastodon_production > /tmp/backup.psqld | ||
cp live/.env.production /tmp/.env.production | cp live/.env.production /tmp/.env.production | ||
| Line 9: | Line 10: | ||
cd live | cd live | ||
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4 | RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.4 | ||
rbenv global 3.0.4 | rbenv global 3.0.4 | ||
git fetch && git checkout v4.0.2 | git fetch && git checkout v4.0.2 | ||
bundle install | bundle install | ||
yarn install | yarn install | ||
SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate | SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate | ||
RAILS_ENV=production bundle exec rails assets:precompile | RAILS_ENV=production bundle exec rails assets:precompile | ||
exit | exit | ||
sudo systemctl restart 'mastodon*' | sudo systemctl restart 'mastodon*' | ||
sudo su - mastodon | sudo su - mastodon | ||
cd live && RAILS_ENV=production bundle exec rails db:migrate | cd live && RAILS_ENV=production bundle exec rails db:migrate | ||
exit | exit | ||
sudo systemctl restart 'mastodon*' | sudo systemctl restart 'mastodon*' | ||
https://techbits.io/mastodon-4-upgrade/ | https://techbits.io/mastodon-4-upgrade/ | ||
Revision as of 23:14, 13 December 2022
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
exit
sudo systemctl restart 'mastodon*'
sudo su - mastodon
cd live && RAILS_ENV=production bundle exec rails db:migrate
exit
sudo systemctl restart 'mastodon*'