useful-scripts/start.sh

18 lines
518 B
Bash
Raw Permalink Normal View History

2024-09-13 13:30:24 +00:00
#!/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