Skip to content

Instantly share code, notes, and snippets.

@nrempel
Created May 25, 2017 05:10
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 nrempel/5adf761b7d3d4454a6a2a59cb0fb3f4a to your computer and use it in GitHub Desktop.
Save nrempel/5adf761b7d3d4454a6a2a59cb0fb3f4a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
SCRIPT_HOME="$( cd "$( dirname "$0" )" && pwd )"
cd $SCRIPT_HOME
case "$1" in
start)
docker-compose up web worker clock
;;
stop)
docker-compose stop
;;
build)
docker-compose build
;;
rebuild)
docker-compose build --no-cache
;;
run)
if [ "$#" -lt "2" ]
then
echo $"Usage: $0 $1 <command>"
RETVAL=1
else
shift
docker-compose run shell "$@"
fi
;;
shell)
docker-compose run shell
;;
*)
echo $"Usage: $0 {start|stop|build|rebuild|run}"
RETVAL=1
esac
cd - > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment