blackbirdchess-docker-dev/laradock.sh
2017-07-15 09:46:52 -04:00

20 lines
532 B
Bash
Executable File

#!/bin/bash
if [[ $# -eq 0 ]] ; then
echo "Missing arguments. Please specify 'up' or 'down'.";
exit 1
fi
if [ "$1" == "up" ] ; then
echo "Initializing Docker Sync";
docker-sync start;
echo "Initializing Docker Compose";
docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d nginx mysql;
elif [ "$1" == "down" ]; then
echo "Stopping Docker Compose";
docker-compose down;
echo "Stopping Docker Sync";
docker-sync stop;
else
echo "Invalid arguments. Use 'up' or 'down'";
fi