18 lines
518 B
Bash
18 lines
518 B
Bash
|
#!/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 "Starting containers in $subfolder"
|
||
|
docker-compose start
|
||
|
else
|
||
|
echo "No docker-compose file found in $subfolder"
|
||
|
fi
|
||
|
fi
|
||
|
done
|