From 6a67456db49b1522912fa6bd26cc5dde3d017d48 Mon Sep 17 00:00:00 2001 From: Yury Kossakovsky Date: Fri, 2 Jan 2026 16:10:55 -0700 Subject: [PATCH] fix(restart): start supabase and dify separately to fix volume paths docker compose resolves relative paths from the first compose file's directory. when multiple compose files are combined, supabase's ./volumes/logs/vector.yml path resolves from project root instead of supabase/docker/, causing vector container to fail with "is a directory" error. this matches the behavior of start_services.py. --- scripts/restart.sh | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/scripts/restart.sh b/scripts/restart.sh index babbb8e..909a4bc 100755 --- a/scripts/restart.sh +++ b/scripts/restart.sh @@ -36,7 +36,37 @@ log_info "Using compose files: ${COMPOSE_FILES[*]}" # Stop all services docker compose -p "$PROJECT_NAME" "${COMPOSE_FILES[@]}" down -# Start all services -docker compose -p "$PROJECT_NAME" "${COMPOSE_FILES[@]}" up -d +# Start services in correct order (matching start_services.py behavior) +# Supabase must be started separately due to relative path resolution in its compose file +if is_profile_active "supabase"; then + SUPABASE_COMPOSE="$PROJECT_ROOT/supabase/docker/docker-compose.yml" + if [ -f "$SUPABASE_COMPOSE" ]; then + log_info "Starting Supabase services..." + docker compose -p "$PROJECT_NAME" -f "$SUPABASE_COMPOSE" up -d + log_info "Waiting for Supabase to initialize..." + sleep 10 + fi +fi + +# Start Dify separately (same relative path issue) +if is_profile_active "dify"; then + DIFY_COMPOSE="$PROJECT_ROOT/dify/docker/docker-compose.yaml" + if [ -f "$DIFY_COMPOSE" ]; then + log_info "Starting Dify services..." + docker compose -p "$PROJECT_NAME" -f "$DIFY_COMPOSE" up -d + log_info "Waiting for Dify to initialize..." + sleep 10 + fi +fi + +# Build main compose files (exclude external stacks that were started separately) +MAIN_COMPOSE_FILES=("-f" "$PROJECT_ROOT/docker-compose.yml") +if path=$(get_n8n_workers_compose); then + MAIN_COMPOSE_FILES+=("-f" "$path") +fi + +# Start main services +log_info "Starting main services..." +docker compose -p "$PROJECT_NAME" "${MAIN_COMPOSE_FILES[@]}" up -d log_success "Services restarted successfully!"