2023-12-22 11:15:38 -08:00
|
|
|
|
|
|
|
I can never seem to remember how to update each time, so I'm taking notes.
|
|
|
|
|
|
|
|
This is just a copy of how I did it last time, which probably isn't best but complex git stuff is above my pay grade
|
|
|
|
|
|
|
|
First, check any changes on the live environment.
|
|
|
|
|
|
|
|
* git status
|
|
|
|
* git commit -v -a && git push (if needed)
|
|
|
|
|
|
|
|
|
|
|
|
Now update the upstream dir and make a branch, because git won't merge from a tag
|
|
|
|
|
|
|
|
* cd ~/projects/mastodon/mastodon-upstream
|
|
|
|
* git pull
|
|
|
|
|
|
|
|
* git tag | tail ## look for the latest release tag
|
|
|
|
* git checkout v4.XX ## use that tag
|
|
|
|
* git branch 4XX
|
|
|
|
* git checkout 4XX ## from here you can check the log to be sure
|
|
|
|
* git checkout main ## gets us out of the detached head state
|
|
|
|
|
|
|
|
|
|
|
|
Merge from the server into deploy
|
|
|
|
|
|
|
|
* cd ../mastodon-deploy
|
|
|
|
* git pull # grab any updates from the first step
|
|
|
|
* git remote add localupstream ../mastodon-deploy ## only if we started fresh otherwise it's still here
|
|
|
|
* git fetch localupstream
|
|
|
|
* git merge localupstream/4XX ## branch name from previous step
|
|
|
|
* git push
|
|
|
|
|
|
|
|
|
|
|
|
Now it's time to update the live server
|
|
|
|
|
|
|
|
* (be root)
|
|
|
|
* cd /srv/mastodon
|
2024-02-14 17:10:59 -08:00
|
|
|
* DOUBLE CHECK THE DOCKER COMPOSE FILE! Upstream might have given a public image name and we don't want that
|
2023-12-22 11:15:38 -08:00
|
|
|
* git pull
|
2024-02-14 17:16:50 -08:00
|
|
|
* resolve the merge conflicts: don't let upstream change docker-compose.yml to use official images!
|
2023-12-22 11:15:38 -08:00
|
|
|
* ## CHECK THE DISK SPACE!!! need plenty of disk free (20%?) on `/` otherwise it will fall on its face
|
|
|
|
* low hanging disk fruit: go around doing `docker compose up -d --force-recreate` in various non-mastodon places to
|
|
|
|
purge some logs and other shit
|
|
|
|
* /srv/nginx
|
|
|
|
* /srv/synapse
|
|
|
|
* ## DOUBLE CHECK THE RELEASE INSTRUCTIONS FOR SPECIAL STEPS
|
|
|
|
* <https://github.com/mastodon/mastodon/releases>
|
2024-02-14 17:14:03 -08:00
|
|
|
* docker compose build
|
2023-12-22 11:15:38 -08:00
|
|
|
* docker compose up -d
|
|
|
|
|
|
|
|
Once satisfied, do some cleanup
|
|
|
|
|
|
|
|
* docker system prune
|
|
|
|
|