diff --git a/run/mastodon/workspace/setup_mastodon.sh b/run/mastodon/workspace/setup_mastodon.sh index 555a21a..08e5064 100644 --- a/run/mastodon/workspace/setup_mastodon.sh +++ b/run/mastodon/workspace/setup_mastodon.sh @@ -24,12 +24,18 @@ yarn install # Next steps are manual when container is started for the first time # https://docs.joinmastodon.org/admin/install/#generating-a-configuration -# If upgrading from a previous image, just need to precompile assets: -# cd live; RAILS_ENV=production bin/rails assets:precompile -# cd /tmp; sudo -u postgres pg_dump -d mastodon_production -F c -f mastodon_production_backup.dump -# incus file pull mastodon/tmp/mastodon_production_backup.dump /tmp/ -# incus file push /tmp/mastodon_production_backup.dump mastodon2/tmp/ -# incus shell mastodon2 +# If upgrading from a previous image, rough notes until automated +# cp /home/mastodon/live/.env.production /home/mastodon/backup/ +# sudo -u postgres pg_dump -d mastodon_production -F c | tee /home/mastodon/backup/mastodon_production.sql > /dev/null +# tofu apply # sudo -u postgres createdb mastodon_production -# sudo -u postgres pg_restore -d mastodon_production -F c /tmp/mastodon_production_backup.dump -# tootctl feeds build +# cat /home/mastodon/backup/mastodon_production.sql | sudo -u postgres pg_restore -d mastodon_production -F c +# 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