Created
June 22, 2017 12:11
-
-
Save gc373/933e9ae43ed3bbf716c2ddb4509517b0 to your computer and use it in GitHub Desktop.
mstdn1.4.3 to 1.4.4
This file contains hidden or 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/bash | |
| ##################################################### | |
| # This script is intended for unattended upgrades | |
| # of a standard Mastodon installation. | |
| # Uncommited changes i.e. in config files | |
| # will be stashed and restored. | |
| # This script is not intended for forks with commits | |
| # as the latest release will be checked out. | |
| # Database migrations and asset-precompilation will | |
| # run automatically. | |
| # Contributed my @Halest | |
| ##################################################### | |
| echo "-----Server down to 503-----" | |
| touch /var/tmp/maintenance | |
| cd /home/masterdon | |
| echo "-----Stashing changes, fetching and pulling latest tag-----" | |
| git stash | |
| git fetch --tags | |
| latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
| git checkout $latestTag | |
| git stash pop | |
| echo "-----Recreating images and containers-----" | |
| service docker restart | |
| docker-compose stop | |
| docker-compose rm -f | |
| docker-compose build | |
| echo "-----Running migrations and precompilations-----" | |
| docker-compose run --rm web rails assets:precompile | |
| docker-compose up -d | |
| docker system prune -f | |
| echo "-----Unattended upgrade finished-----" | |
| rm /var/tmp/maintenance | |
| echo "----- Done !!!!! -----" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this shellscript from
Create a script for easy updates on docker-compose #2396
these 2 lines L14 L32 is for nginx settings.
like this.