Created
December 13, 2016 16:17
-
-
Save bofm/8e8fff43a7ac24a7302818fd8a69559e to your computer and use it in GitHub Desktop.
docker-compose and fswatch based CI one-liner
This file contains 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
ctnrs=(nginx); fswatch -e '.*/\..*' `grep context docker-compose.yml|awk -F':' '{print $2}'`|while read; do kill -0 "$p" &>/dev/null && kill "$p" && p=; sleep 0.2; docker-compose rm -f -v $ctnrs && docker-compose up --build $ctnrs &; p=$!; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment