Created
April 16, 2020 16:06
-
-
Save fabiosussetto/3397589c7950c49005a4e3dae3e2c288 to your computer and use it in GitHub Desktop.
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
set -x | |
set -e | |
PREVIOUS_CONTAINER=$(docker ps --format "table {{.ID}} {{.Names}} {{.CreatedAt}}" | grep web | awk -F " " '{print $1}') | |
docker-compose up -d --no-deps --scale web=2 --no-recreate web | |
sleep 30 | |
docker kill -s SIGTERM $PREVIOUS_CONTAINER | |
sleep 1 | |
docker rm -f $PREVIOUS_CONTAINER | |
docker-compose up -d --no-deps --scale web=1 --no-recreate web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment