Skip to content

fix(wsl2): Add --project-directory to all docker compose invocations - #590

Closed
POWERFULMOVES wants to merge 1 commit into
PMOVES.AI-Edition-Hardenedfrom
fix/wsl2-docker-compose-paths
Closed

POWERFULMOVES wants to merge 1 commit into
PMOVES.AI-Edition-Hardenedfrom
fix/wsl2-docker-compose-paths

Conversation

@POWERFULMOVES

Copy link
Copy Markdown
Owner

Summary

Fixes WSL2 Docker Desktop path resolution issues by adding --project-directory to all docker compose invocations.

Root Cause

WSL2 Docker Desktop requires explicit --project-directory for proper resolution of relative paths in docker-compose.yml files. Without it, bind mounts fail with "not a directory" errors.

Changes

Makefile:

  • Added PROJECT_DIR := --project-directory $(CURDIR) variable
  • Updated DC variable to include PROJECT_DIR
  • Fixed 32 docker compose invocations to use $(DC) or add --project-directory

Shell Scripts:

  • apply_migrations_docker.sh: Added env sourcing and --project-directory
  • smoke-tests.sh: Added --project-directory to 3 invocations
  • validate-phase1-hardening.sh: Added --project-directory to 3 invocations, removed cd pattern

Test Plan

  • Verify make up-supabase works in WSL2
  • Verify make backup works in WSL2
  • Verify ./scripts/smoke-tests.sh works in WSL2

Resolves CROSS_PLATFORM_TASKS.md Issue C2.

🤖 Generated with Claude Code

WSL2 Docker Desktop requires explicit --project-directory for proper
path resolution of relative paths in docker-compose.yml files.

Changes:
- Add PROJECT_DIR := --project-directory $(CURDIR) to Makefile
- Update DC variable to include PROJECT_DIR
- Fix 32 Makefile invocations: use $(DC) or add --project-directory
- Fix 3 shell scripts: add --project-directory and env sourcing
  * apply_migrations_docker.sh
  * smoke-tests.sh
  * validate-phase1-hardening.sh

Resolves CROSS_PLATFORM_TASKS.md - Issue C2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/wsl2-docker-compose-paths

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@POWERFULMOVES

Copy link
Copy Markdown
Owner Author

Superseded by commits f3d51a10 and 87d4293e on PMOVES.AI-Edition-Hardened branch.

All changes from this PR have been incorporated with improvements:

  • Port consistency fixes (container-to-container uses :3000, host uses :3030)
  • WSL2 --project-directory fixes for all Makefile targets and scripts
  • Network cleanup with improved error handling

The hardened branch includes the complete fix set, so this PR is being closed.

POWERFULMOVES pushed a commit that referenced this pull request Feb 7, 2026
This commit addresses critical issues found during PR review:

**PR #592 - TensorZero Port Consistency**
- Fix internal container-to-container communication to use port 3000
  (not host port 3030) across all services
- Files updated: gateway-agent, deepresearch, agent-zero, n8n flows,
  tokenism-simulator, mcp configs, docker-compose overrides

**PR #593 - ClickHouse Configuration**
- Fix ClickHouse URL format to include embedded credentials
- Remove unused separate USER/PASSWORD/DB environment variables

**PR #595 - Documentation Port Fixes**
- Correct Grafana port from 3000 to 3002 in documentation

**PR #590 - Docker Compose --project-directory**
- Add --project-directory to DC variable for WSL2 compatibility
- Convert inline docker compose commands to use $(DC) variable
- Fix up-supabase, backup, brand-defaults, and neo4j targets

**PR #594 - Network Cleanup with Error Handling**
- Add clean-networks target with improved error reporting
- Provides warnings instead of silent failures
- Integrated into 'up' target as pre-flight check

**New Automated Tool**
- Add port-consistency-check.sh script for validation
- Can detect and auto-fix port inconsistencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
POWERFULMOVES pushed a commit that referenced this pull request Feb 7, 2026
This commit incorporates the remaining changes from open PRs that were
not included in the initial port consistency fix commit:

**From PR #590 (WSL2 --project-directory)**
- Add --project-directory to apply_migrations_docker.sh
- Add --project-directory to smoke-tests.sh
- Add --project-directory to validate-phase1-hardening.sh
- Remove unsafe 'cd' pattern, use explicit paths instead

**From PR #591 (API Key Validation)**
- Add provider API key validation to env_check.sh
- Checks for OpenAI, Anthropic, Groq, Gemini, Ollama
- Warns about empty/placeholder API keys
- Provides helpful configuration tips

**From PR #587 (Security Update)**
- Update python-multipart to 0.0.22 (CVE-2026-24486 fix)
- Applied to agentgym-rl-coordinator and Enhanced Media Stack plans
- NOTE: Transformers constraint kept at <4.50.0 for FlagEmbedding

All superseded PRs can now be closed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@POWERFULMOVES
POWERFULMOVES deleted the fix/wsl2-docker-compose-paths branch March 7, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant