diff options
author | reverite <samantha@chalker.io> | 2018-03-27 22:05:35 -0700 |
---|---|---|
committer | reverite <samantha@chalker.io> | 2018-03-27 22:05:35 -0700 |
commit | 8550be23e6dd30ab24b109185ead7ae432903cce (patch) | |
tree | 944ec2ecd9e35c649d3fcc6827db2582a54e698e /deploy/scripts/update-containers.sh | |
parent | 0e335fdbe68e827cbe23ea376c9efe28dc91aaef (diff) |
rearrange
Diffstat (limited to 'deploy/scripts/update-containers.sh')
-rwxr-xr-x | deploy/scripts/update-containers.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/scripts/update-containers.sh b/deploy/scripts/update-containers.sh new file mode 100755 index 0000000..ff63e9e --- /dev/null +++ b/deploy/scripts/update-containers.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +[ -z "$COMPOSE" ] && COMPOSE="$(command -v docker-compose)" +[ -z "$COMPOSE" ] && COMPOSE="/usr/local/bin/docker-compose" + +cd $HOME + +($COMPOSE pull 2>&1 | grep --silent "Downloaded newer") && \ + $COMPOSE up -d && \ + docker cp $($COMPOSE ps -q mstweb):/mastodon/public/assets public/ && \ + docker cp $($COMPOSE ps -q mstweb):/mastodon/public/packs public/ && \ + docker image prune -f |