Skip to content

Instantly share code, notes, and snippets.

@bofm
Created December 13, 2016 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bofm/8e8fff43a7ac24a7302818fd8a69559e to your computer and use it in GitHub Desktop.
Save bofm/8e8fff43a7ac24a7302818fd8a69559e to your computer and use it in GitHub Desktop.
docker-compose and fswatch based CI one-liner
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