This repository has been archived on 2023-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-scripts/docker-compose-up-all.sh

17 lines
339 B
Bash
Raw Normal View History

2020-06-15 15:33:04 +00:00
#!/bin/bash
for dir in */; do
service="${dir/\//}"
if [ -f "$service/docker-compose.yml" ]; then
2020-12-13 22:40:43 +00:00
cd "$service" || exit 1
echo "pull $service"
2020-12-13 22:40:43 +00:00
docker-compose pull
echo "up $service"
2020-12-13 22:40:43 +00:00
docker-compose up --build --remove-orphans -d
cd ..
fi
2020-06-15 15:33:04 +00:00
done
echo "cleanup docker"
2020-09-04 15:49:29 +00:00
docker system prune --all --volumes --force