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

13 lines
274 B
Bash
Raw Normal View History

#!/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