updated docker-compose-up-all.sh
added docker-stack-deploy-all.sh
This commit is contained in:
parent
af9cf6cd9a
commit
3350f559f7
2 changed files with 20 additions and 4 deletions
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
for dir in */; do
|
for dir in */; do
|
||||||
echo "pull $dir"
|
service="${dir/\//}"
|
||||||
docker-compose -f "$dir/docker-compose.yml" pull
|
if [ -f "$service/docker-compose.yml" ]; then
|
||||||
echo "up $dir"
|
echo "pull $service"
|
||||||
docker-compose -f "$dir/docker-compose.yml" up --build --remove-orphans -d
|
docker-compose -f "$service/docker-compose.yml" pull
|
||||||
|
echo "up $service"
|
||||||
|
docker-compose -f "$service/docker-compose.yml" up --build --remove-orphans -d
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "cleanup docker"
|
||||||
docker system prune --all --volumes --force
|
docker system prune --all --volumes --force
|
||||||
|
|
12
docker-stack-deploy-all.sh
Normal file
12
docker-stack-deploy-all.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/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
|
Reference in a new issue