Add 'rebuild.sh' to rebuild a docker image

This commit is contained in:
Tom Wiesing 2020-07-07 15:49:55 +02:00
parent 5905847b1c
commit a25c12b0fa
No known key found for this signature in database
GPG key ID: DC1F29F2BC78AB15
6 changed files with 57 additions and 11 deletions

View file

@ -6,14 +6,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"
source "$DIR/lib/lib.sh"
# update_stack fully updates a docker-compose stack in the given location.
function update_stack() {
cd "$1"
docker-compose pull
docker-compose build --pull
docker-compose up -d
}
log_info "=> Rebuilding and restarting 'web' stack"
update_stack "$DEPLOY_WEB_DIR"