add start script
This commit is contained in:
18
start_all_projects.sh
Normal file
18
start_all_projects.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
for dir in /home/ccalifice/compose-projects/*; do
|
||||
# Remove trailing slash
|
||||
dir=${dir%/}
|
||||
|
||||
# Check if it is a directory and does NOT end with "DISABLED"
|
||||
if [[ -d "$dir" && ! "$dir" =~ DISABLED$ ]]; then
|
||||
if [ -f "$dir/docker-compose.yml" ]; then
|
||||
echo "Bringing up Docker Compose in $dir"
|
||||
(cd "$dir" && docker compose up -d)
|
||||
else
|
||||
echo "No docker-compose.yml found in $dir, skipping."
|
||||
fi
|
||||
else
|
||||
echo "Project is disabled. Skipping $dir"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user