From 5b3e1d31051891bbd4f149e2043544c5ca440d44 Mon Sep 17 00:00:00 2001 From: Christoph Califice Date: Wed, 13 Aug 2025 23:00:00 -0300 Subject: [PATCH] add start script --- start_all_projects.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 start_all_projects.sh diff --git a/start_all_projects.sh b/start_all_projects.sh new file mode 100644 index 0000000..9dcd3ac --- /dev/null +++ b/start_all_projects.sh @@ -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 \ No newline at end of file