An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
Use main repo directories for shared dependencies
Andras Bacsaib847e3801aa1
diff --git a/CLAUDE.md b/CLAUDE.mdindex e8c0404027..3982ec81c0 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -17,8 +17,8 @@ This repository uses git worktrees for parallel development with **automatic sha### How It WorksThe `conductor.json` setup script (`scripts/conductor-setup.sh`) automatically:-1. Creates a shared `.shared-deps/` directory in the main repository-2. Creates symlinks from `node_modules` and `vendor` to the shared location+1. Creates symlinks from worktree's `node_modules` and `vendor` to the main repository's directories+2. All worktrees share the same dependencies from the main repository3. This happens automatically when Conductor creates a new worktree### Benefits@@ -27,6 +27,7 @@ The `conductor.json` setup script (`scripts/conductor-setup.sh`) automatically:- **Faster setup**: No need to run `npm install` or `composer install` for each worktree- **Consistent versions**: All worktrees use the same dependency versions- **Auto-configured**: Handled by Conductor's setup script+- **Simple**: Uses the main repo's existing directories, no extra folders### Manual Setup (If Needed)@@ -34,18 +35,15 @@ If you need to set up symlinks manually or for non-Conductor worktrees:```bash# From the worktree directory-SHARED_DEPS="../../.shared-deps"-mkdir -p "$SHARED_DEPS/node_modules" "$SHARED_DEPS/vendor"rm -rf node_modules vendor-ln -sf "$SHARED_DEPS/node_modules" node_modules-ln -sf "$SHARED_DEPS/vendor" vendor+ln -sf ../../node_modules node_modules+ln -sf ../../vendor vendor```### Important Notes-- Dependencies are shared at `$CONDUCTOR_ROOT_PATH/.shared-deps/`-- Run `npm install` or `composer install` from any worktree to update all-- Ensure `.shared-deps/` is in `.gitignore` (should already be there)+- Dependencies are shared from the main repository (`$CONDUCTOR_ROOT_PATH`)+- Run `npm install` or `composer install` from the main repo or any worktree to update all- If different branches need different dependency versions, this won't work - remove symlinks and use separate directories## Development Commandsdiff --git a/scripts/conductor-setup.sh b/scripts/conductor-setup.shindex 963c8e8085..a1172e0d07 100755--- a/scripts/conductor-setup.sh+++ b/scripts/conductor-setup.sh@@ -4,23 +4,22 @@ set -e# Copy .env filecp $CONDUCTOR_ROOT_PATH/.env .env-# Setup shared dependencies via symlinks+# Setup shared dependencies via symlinks to main repoecho "Setting up shared node_modules and vendor directories..."-# Create shared-deps directory in main repository if it doesn't exist-SHARED_DEPS="$CONDUCTOR_ROOT_PATH/.shared-deps"-mkdir -p "$SHARED_DEPS/node_modules"-mkdir -p "$SHARED_DEPS/vendor"+# Ensure main repo has the directories+mkdir -p "$CONDUCTOR_ROOT_PATH/node_modules"+mkdir -p "$CONDUCTOR_ROOT_PATH/vendor"# Remove existing directories if they exist and are not symlinks[ -d "node_modules" ] && [ ! -L "node_modules" ] && rm -rf node_modules[ -d "vendor" ] && [ ! -L "vendor" ] && rm -rf vendor-# Calculate relative path from worktree to shared deps+# Calculate relative path from worktree to main repoWORKTREE_PATH=$(pwd)-RELATIVE_PATH=$(python3 -c "import os.path; print(os.path.relpath('$SHARED_DEPS', '$WORKTREE_PATH'))")+RELATIVE_PATH=$(python3 -c "import os.path; print(os.path.relpath('$CONDUCTOR_ROOT_PATH', '$WORKTREE_PATH'))")-# Create symlinks+# Create symlinks to main repo's node_modules and vendorln -sf "$RELATIVE_PATH/node_modules" node_modulesln -sf "$RELATIVE_PATH/vendor" vendor