Skip to content

Instantly share code, notes, and snippets.

@skoji
Last active October 5, 2023 09:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save skoji/41de838c73aa6c33c40108cba60bf7c8 to your computer and use it in GitHub Desktop.
Save skoji/41de838c73aa6c33c40108cba60bf7c8 to your computer and use it in GitHub Desktop.
Mastodon : execute assets:precompile on a local machine.
# on the mastodon server
cd /home/mastodon/live
git checkout <release tag>
docker-compose pull && docker-compose build && docker-compose stop
# on the local machine
rsync -trzv --delete --rsync-path='sudo rsync' mastodon@server.example.com:/home/mastodon/live/ backup # get full backup
cd backup
docker-compose pull && docker-compose build && docker-compose run --rm web rails assets:precompile
cd ..
rsync -trzv ./backup/public mastodon@skoji:/home/mastodon/live/ # write back the public directory
# on the mastodon server
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment