From fd953c3e564e428ebd6ec7bf4e255e66c8124b9c Mon Sep 17 00:00:00 2001 From: Yury Kossakovsky Date: Sun, 14 Dec 2025 14:19:50 -0700 Subject: [PATCH] fix(supabase): include external compose files in start_local_ai() The --remove-orphans flag was killing Supabase and Dify containers because their compose files were not included when starting local AI services. Now we include them conditionally if they are enabled. --- start_services.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/start_services.py b/start_services.py index 982b2d8..86950c1 100755 --- a/start_services.py +++ b/start_services.py @@ -229,6 +229,18 @@ def start_local_ai(): if os.path.exists(n8n_workers_compose_path): compose_files.extend(["-f", n8n_workers_compose_path]) + # Include Supabase compose file if enabled (prevents --remove-orphans from killing Supabase containers) + if is_supabase_enabled(): + supabase_compose_path = os.path.join("supabase", "docker", "docker-compose.yml") + if os.path.exists(supabase_compose_path): + compose_files.extend(["-f", supabase_compose_path]) + + # Include Dify compose file if enabled (prevents --remove-orphans from killing Dify containers) + if is_dify_enabled(): + dify_compose_path = os.path.join("dify", "docker", "docker-compose.yaml") + if os.path.exists(dify_compose_path): + compose_files.extend(["-f", dify_compose_path]) + # Explicitly build services and pull newer base images first. print("Checking for newer base images and building services...") build_cmd = ["docker", "compose", "-p", "localai"] + compose_files + ["build", "--pull"]