#!/bin/sh
cur_dir=$(cd `dirname $0`;pwd)

function start(){
ls  -d */|awk -F '/' '{print $1}'|grep -v "env" |while read line; do cd $line;docker-compose build ; docker-compose up -d ;cd ../;done;
}
function stop(){
 ls  -d */|awk -F '/' '{print $1}'|grep -v "env" |while read line; do cd $line; docker-compose down; cd ../;done;
}

function status(){
  docker ps -a|grep ea |grep -v ea1
}

function usage(){
  echo "$0 [start|stop|status|usage]"
} 
case "$1" in
  "start")
   start
  ;;
  "stop")
   stop
  ;;
  "status")
   status
  ;;
  *)
   usage
  ;;
esac

