Created
July 10, 2017 15:26
-
-
Save marklabrecque/8f02a4921806f0bac7bfe535053d75ae to your computer and use it in GitHub Desktop.
Global docker management script (hardcoded repo PATH)
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
function shipyard() { | |
# default is 'down' if no parameter is supplied | |
if [ -z "$1" ] | |
then | |
docker-kill-all | |
else | |
if [[ $1 == "down" ]] | |
then | |
docker-kill-all | |
fi | |
if [[ $1 == "up" ]] | |
then | |
cd ~/shipyard | |
docker-compose up -d | |
fi | |
if [[ $1 == "restart" ]] | |
then | |
docker-kill-all | |
docker-compose up -d | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment