Skip to content
Snippets Groups Projects
Commit 681b1942 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed bug in rerunning a service if there are no changes in the Docker image.

parent 849ab494
No related branches found
No related tags found
No related merge requests found
......@@ -10,5 +10,11 @@ if [[ $# -eq 0 ]] ; then
docker-compose down
docker-compose up -d
else
docker-compose up -d --no-deps $@
UPDATE_OUT=$(docker-compose up -d --no-deps $@ 2>&1)
if [[ $UPDATE_OUT == *"is up-to-date"* ]]; then
echo "Image is up to date, only restarting the service..."
docker-compose restart $@
else
echo "Updated image and restarted the the service."
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment