18 lines
No EOL
516 B
Bash
Executable file
18 lines
No EOL
516 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Directory containing docker-compose files
|
|
directory="/media/data/jarvis/docker"
|
|
|
|
# Loop through each subfolder
|
|
for subfolder in "$directory"/*; do
|
|
if [ -d "$subfolder" ]; then
|
|
cd "$subfolder" || exit
|
|
# Check if docker-compose.yml or docker-compose.yaml file exists
|
|
if [ -e "docker-compose.yml" ] || [ -e "docker-compose.yaml" ]; then
|
|
echo "Upping containers in $subfolder"
|
|
docker-compose up -d
|
|
else
|
|
echo "No docker-compose file found in $subfolder"
|
|
fi
|
|
fi
|
|
done |