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-stack-deploy-all.sh
samuel-p 3350f559f7 updated docker-compose-up-all.sh
added docker-stack-deploy-all.sh
2020-10-19 19:59:22 +02:00

12 lines
274 B
Bash

#!/bin/bash
for dir in */; do
service="${dir/\//}"
if [ -f "$service/docker-compose.yml" ]; then
echo "deploy $service"
docker stack deploy -c "$service/docker-compose.yml" "$service"
fi
done
echo "cleanup docker"
docker system prune --all --volumes --force