2017-07-15 21:40:25 +08:00
|
|
|
#!/bin/bash
|
|
|
|
if [[ $# -eq 0 ]] ; then
|
|
|
|
echo "Missing arguments. Please specify 'up' or 'down'.";
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-07-15 21:46:52 +08:00
|
|
|
if [ "$1" == "up" ] ; then
|
2017-07-15 21:40:25 +08:00
|
|
|
echo "Initializing Docker Sync";
|
|
|
|
docker-sync start;
|
|
|
|
echo "Initializing Docker Compose";
|
2017-07-15 21:56:03 +08:00
|
|
|
docker-compose -f docker-compose.yml -f docker-compose.sync.yml $@ -d;
|
2017-07-15 21:46:52 +08:00
|
|
|
elif [ "$1" == "down" ]; then
|
2017-07-15 21:40:25 +08:00
|
|
|
echo "Stopping Docker Compose";
|
|
|
|
docker-compose down;
|
|
|
|
echo "Stopping Docker Sync";
|
2017-07-15 21:44:09 +08:00
|
|
|
docker-sync stop;
|
2017-07-15 21:46:52 +08:00
|
|
|
else
|
|
|
|
echo "Invalid arguments. Use 'up' or 'down'";
|
2017-07-15 21:40:25 +08:00
|
|
|
fi
|