Created
December 10, 2023 00:42
-
-
Save kramerc/f71d61ec84c1bf74e941b6d8df259302 to your computer and use it in GitHub Desktop.
Mastodon upgrade scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VERSION=$1 | |
if [ -z $VERSION ] | |
then | |
echo "No version specified. Example: deploy_version.sh v4.1.3" | |
exit 1 | |
fi | |
sudo systemctl stop mastodon-web mastodon-sidekiq mastodon-streaming && \ | |
sudo -u mastodon rm -rvf /home/mastodon/live && \ | |
sudo -u mastodon ln -s /home/mastodon/$VERSION /home/mastodon/live && \ | |
sudo systemctl start mastodon-web mastodon-sidekiq mastodon-streaming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VERSION=$1 | |
if [ -z $VERSION ] | |
then | |
echo "No version specified. Example: fetch_version.sh v4.1.3" | |
exit 1 | |
fi | |
cp -r /home/mastodon/live/ /home/mastodon/$VERSION | |
cd /home/mastodon/$VERSION | |
git fetch --all | |
git checkout $VERSION | |
bundle && yarn install --pure-lockfile && RAILS_ENV=production bundle exec rails assets:precompile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment