COMPOSE_FILE=docker-compose.yml

if [ $# -ge 1 ]
then
  COMPOSE_FILE=$1
fi

echo "docker-compose file: $COMPOSE_FILE"

sudo COMPOSE_API_VERSION=auto \
 docker-compose -f $COMPOSE_FILE up --force-recreate --abort-on-container-exit \
&& sudo COMPOSE_API_VERSION=auto docker-compose -f $COMPOSE_FILE down

# Lists existing docker containers after stop (list should be empty)
sudo docker ps -a
