#!/bin/bash
for dir in */; do
service="${dir/\//}"
if [ -f "$service/docker-compose.yml" ]; then
cd "$service" || exit 1
echo "pull $service"
docker-compose pull
echo "up $service"
docker-compose up --build --remove-orphans -d
cd ..
fi
done
echo "cleanup docker"
docker system prune --all --volumes --force