Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronlifton/3a0f09857f72ea0d5c4305709fa788f7 to your computer and use it in GitHub Desktop.
Save aaronlifton/3a0f09857f72ea0d5c4305709fa788f7 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