Mastodon: Temporary notes on migrate steps

This commit is contained in:
Benoit 2025-03-02 19:31:43 +09:00
parent 5231b926a9
commit 5046c90e49
Signed by: Benoit
SSH key fingerprint: SHA256:kFsX94Kq6z/6CY0dX+7/FpAeJC0QlMhJVY+B7NYrOmA

View file

@ -24,12 +24,18 @@ yarn install
# Next steps are manual when container is started for the first time # Next steps are manual when container is started for the first time
# https://docs.joinmastodon.org/admin/install/#generating-a-configuration # https://docs.joinmastodon.org/admin/install/#generating-a-configuration
# If upgrading from a previous image, just need to precompile assets: # If upgrading from a previous image, rough notes until automated
# cd live; RAILS_ENV=production bin/rails assets:precompile # cp /home/mastodon/live/.env.production /home/mastodon/backup/
# cd /tmp; sudo -u postgres pg_dump -d mastodon_production -F c -f mastodon_production_backup.dump # sudo -u postgres pg_dump -d mastodon_production -F c | tee /home/mastodon/backup/mastodon_production.sql > /dev/null
# incus file pull mastodon/tmp/mastodon_production_backup.dump /tmp/ # tofu apply
# incus file push /tmp/mastodon_production_backup.dump mastodon2/tmp/
# incus shell mastodon2
# sudo -u postgres createdb mastodon_production # sudo -u postgres createdb mastodon_production
# sudo -u postgres pg_restore -d mastodon_production -F c /tmp/mastodon_production_backup.dump # cat /home/mastodon/backup/mastodon_production.sql | sudo -u postgres pg_restore -d mastodon_production -F c
# tootctl feeds build # sudo -u mastodon -i
# cd backup/.env.production live/
# cd live
# bin/rails assets:precompile
# cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/system/
# systemctl daemon-reload
# systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming
# sudo -u mastdon -i
# bin/tootctl feeds build