infrastructure/ansible/roles/docker/files/docker-utils/start-all.sh

12 lines
266 B
Bash
Raw Normal View History

2020-02-02 22:20:17 +00:00
#!/usr/bin/env bash
set -e
for compose_file in /opt/**/docker-compose.yml; do
if [[ ! $(docker-compose -f $compose_file ps -q) ]]; then
docker-compose -f $compose_file up -d
else
echo "> Skipping $compose_file as it's running."
fi
done