Skip to content

Fix Linux Docker Networking and Add Flexible Port Configuration#195

Closed
hebelmx wants to merge 4 commits intocoleam00:mainfrom
hebelmx:coleArchon
Closed

Fix Linux Docker Networking and Add Flexible Port Configuration#195
hebelmx wants to merge 4 commits intocoleam00:mainfrom
hebelmx:coleArchon

Conversation

@hebelmx
Copy link
Copy Markdown

@hebelmx hebelmx commented Aug 14, 2025

Pull Request Fix Linux Docker Networking and Add Flexible Port Configuration

Summary

This PR addresses critical deployment issues on Linux systems and adds flexible port configuration to avoid conflicts with existing services. These changes will help users successfully deploy Archon alongside other applications like Supabase projects and development servers.

Problems Solved

1. 🐛 Docker Network Connectivity Issues on Linux

Problem: Containers couldn't reach host services through host.docker.internal on Linux systems, causing Supabase connection timeouts.

Solution:

  • Use host-gateway instead of hardcoded IPs for better cross-platform compatibility
  • Document network configuration options for different deployment scenarios

2. 🐛 Port Conflicts with Existing Services

Problem: Default ports (3737, 8181, 8051, 8052) often conflict with other development tools.

Solution:

  • Separate internal (container) ports from external (host) ports
  • Use environment variables for flexible external port mapping
  • Keep internal ports as defaults for simpler container-to-container communication

3. 🐛 DOCKER_HOST Environment Conflicts

Problem: Systems with Podman or custom Docker configurations fail due to DOCKER_HOST variable interference.

Solution:

  • Add startup script that properly handles Docker environment
  • Document the need to unset DOCKER_HOST when needed

4. 🐛 Supabase Network Isolation

Problem: When using local Supabase, Archon containers on separate networks cannot communicate with Supabase services.

Solution:

  • Provide configuration option to join existing Supabase network
  • Document both isolated and shared network approaches

Changes Made

1.Updated docker-compose.yml
2. Created start_archon.sh
3. Enhanced .env.example
4.Created DEPLOYMENT_TROUBLESHOOTING.md

1. Updated docker-compose.yml

# Separated internal and external ports
ports:
  - "${ARCHON_SERVER_PORT:-8181}:8181"  # External can change, internal stays consistent

# Fixed host.docker.internal for Linux
extra_hosts:
  - "host.docker.internal:host-gateway"  # Works on all platforms Tested only on ubuntu

# Network configuration options
networks:
  app-network:
    driver: bridge  # Default isolated network
    # OR for Supabase integration:
    # external: true
    # name: supabase_network_name

2. Created start_archon.sh

#!/bin/bash
# Handles environment setup and provides clear startup information
unset DOCKER_HOST  # Prevents Podman/custom Docker conflicts
docker compose up --build -d
echo "Access points:"
echo "  Web UI: http://localhost:${ARCHON_UI_PORT:-3737}"
# ... etc

3. Enhanced .env.example

# Custom port configuration to avoid conflicts
ARCHON_SERVER_PORT=8181  # Change to 9282 if 8181 is in use
ARCHON_MCP_PORT=8051     # Change to 9151 if 8051 is in use
ARCHON_AGENTS_PORT=8052  # Change to 9152 if 8052 is in use
ARCHON_UI_PORT=3737      # Change to 4838 if 3737 is in use

# Network configuration for local Supabase
# For local Supabase: use container name
# SUPABASE_URL=http://supabase_kong:8000
# For remote Supabase: use public URL
# SUPABASE_URL=https://your-project.supabase.co

4. Added Comprehensive Documentation

  • DEPLOYMENT_TROUBLESHOOTING.md - Common issues and solutions

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Affected Services

  • Frontend (React UI)
  • Server (FastAPI backend)
  • MCP Server (Model Context Protocol)
  • Agents (PydanticAI service)
  • Database (migrations/schema)
  • Docker/Infrastructure
  • [X ] Documentation site

Testing

Tested on:

  • ✅ Ubuntu 24.04 with Docker 28.3.3
  • ✅ System with existing Supabase local deployment
  • ✅ System with Podman installed (DOCKER_HOST conflict resolved)
  • ✅ Multiple services running on default ports
  • All existing tests pass
  • Added new tests for new functionality
  • Manually tested affected user flows
  • [X ] Docker builds succeed for all services

Test Evidence

DEPLOYMENT_SUCCESS.md

# Example: python -m pytest tests/
# Example: cd archon-ui-main && npm run test

Breaking Changes

None

Checklist

  • [X ] My code follows the service architecture patterns
  • If using an AI coding assistant, I used the CLAUDE.md rules
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass locally
  • My changes generate no new warnings
  • [X ] I have updated relevant documentation
  • [X ] I have verified no regressions in existing features

Breaking Changes

None - all changes are backward compatible with existing deployments.

Additional Notes

Summary by CodeRabbit

  • New Features

    • One-command startup script for Docker deployment that prints access URLs and waits for health checks.
  • Refactor

    • Configurable external ports and Linux-friendly host-gateway mapping.
    • Updated default host ports: API 9282, MCP 9151, Agents 9152.
    • Consolidated networking to a shared Supabase network for simpler service discovery.
  • Documentation

    • Added deployment guide with quick-start, health checks, env samples, and access points.
    • Added troubleshooting guide with diagnostics, fixes, platform notes, and env reference.
  • Chores

    • Added Supabase branch tracking file.

@Wirasm Wirasm requested a review from coleam00 August 16, 2025 20:42
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from claude Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
Repository owner deleted a comment from github-actions Bot Aug 19, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 22, 2025

Walkthrough

Adds deployment documentation and troubleshooting guides, a PR draft and startup script, updates docker-compose networking/port mappings and inter-service URLs for Supabase integration, and adds a Supabase branch marker file.

Changes

Cohort / File(s) Summary
Docs: Deployment & Troubleshooting
DEPLOYMENT_SUCCESS.md, DEPLOYMENT_TROUBLESHOOTING.md
New guides describing a full Archon deployment with local Supabase, environment samples, port mappings, network details, health checks, diagnostics, troubleshooting steps, and quick-fix commands. No code changes.
PR Draft / Release Notes
PR_DRAFT.md
Adds notes on Linux-friendly Docker networking (host-gateway), separation of external vs. internal ports, updated .env.example, and references the new startup script and troubleshooting doc.
Docker Orchestration
docker-compose.yml
Reworks host port mappings (host→container: 9282→8181, 9151→8051, 9152→8052), hard-codes internal ports in env, sets SUPABASE_URL to container DNS (http://supabase_kong_Archon:8000), updates API/AGENTS service URLs to container addresses, adds extra_hosts: host.docker.internal:host-gateway, condenses command/healthcheck syntax, and moves services onto supabase_network_Archon.
Startup Script
start_archon.sh
New launcher that unsets DOCKER_HOST, verifies Docker, tears down previous stack, builds/starts compose with wait, prints container status and host endpoints, and shows log/stop commands.
Supabase Branch Marker
supabase/.branches/_current_branch
Adds file containing main to record the active Supabase branch.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant Script as start_archon.sh
  participant Docker as Docker Engine
  participant Compose as docker compose
  participant Archon as archon-* services
  participant Supa as supabase_* (network)

  User->>Script: run start_archon.sh
  Script->>Docker: docker info
  alt Docker available
    Script->>Compose: down (ignore errors)
    Script->>Compose: up --build -d --wait
    Note right of Compose: Containers join supabase_network_Archon
    Compose-->>Archon: start services (server, mcp, agents, frontend)
    Archon->>Supa: resolve supabase_kong_Archon:8000
    Archon->>Archon: internal requests via container DNS (e.g., archon-server:8181)
    Script-->>User: print host endpoints (e.g., 9282, 9151, 9152) and helper commands
  else Docker unavailable
    Script-->>User: exit with error
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

I twitch my ears at ports that gleam,
9282—a streaming dream!
Hops across the Supabase bridge,
containers chat from ridge to ridge.
The script taps keys, the logs agree—Archon wakes; carrots for me!

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 81ee4f8 and e6f5a03.

📒 Files selected for processing (1)
  • start_archon.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • start_archon.sh
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docker-compose.yml (2)

87-94: Duplicate extra_hosts keys under archon-mcp as well.

Same fix as archon-server; keep a single block.

-    extra_hosts:
-      - "host.docker.internal:host-gateway"
 ...
-    extra_hosts:
-      - "host.docker.internal:host-gateway"
+    extra_hosts:
+      - "host.docker.internal:host-gateway"

145-147: Frontend points to 8181 by default; server defaults to 9282 externally — API calls will fail on clean envs.

Set the default to 9282 so the UI can reach the backend without extra configuration.

-      - VITE_API_URL=http://${HOST:-localhost}:${ARCHON_SERVER_PORT:-8181}
-      - VITE_ARCHON_SERVER_PORT=${ARCHON_SERVER_PORT:-8181}
-      - ARCHON_SERVER_PORT=${ARCHON_SERVER_PORT:-8181}
+      - VITE_API_URL=http://${HOST:-localhost}:${ARCHON_SERVER_PORT:-9282}
+      - VITE_ARCHON_SERVER_PORT=${ARCHON_SERVER_PORT:-9282}
+      - ARCHON_SERVER_PORT=${ARCHON_SERVER_PORT:-9282}
🧹 Nitpick comments (17)
supabase/.branches/_current_branch (1)

1-1: Add a trailing newline to satisfy POSIX/text tooling expectations.

Many linters and Git diffs prefer files to end with a newline; also flagged elsewhere in this PR.

Apply:

-main
+main
+
start_archon.sh (2)

1-14: Harden the script and fail fast.

Add strict mode to catch failures (unset vars, pipe fails) and exit on first error. Also surface when DOCKER_HOST was unset for easier debugging.

 #!/bin/bash
+set -Eeuo pipefail
 
 # Start Archon with proper Docker configuration
 
 echo "Starting Archon deployment..."
 
 # Unset DOCKER_HOST to use regular Docker daemon
-unset DOCKER_HOST
+if [[ -n "${DOCKER_HOST:-}" ]]; then
+  echo "Unsetting DOCKER_HOST (${DOCKER_HOST}) to use the local Docker daemon..."
+  unset DOCKER_HOST
+fi
+
+# Verify docker compose plugin is available
+if ! docker compose version >/dev/null 2>&1; then
+  echo "Error: 'docker compose' plugin not found. Please install Docker Compose v2."
+  exit 1
+fi

49-53: Provide a matching “stop” with volume cleanup hint.

Optional, but users often need to “reset” quickly.

 echo "To stop Archon:"
 echo "  docker compose down"
+echo ""
+echo "Full reset (removes volumes!):"
+echo "  docker compose down -v && docker compose up --build -d --wait"
DEPLOYMENT_TROUBLESHOOTING.md (1)

15-24: Minor editorial: clarify Linux host resolution guidance.

Tighten phrasing and make the “host-gateway” solution stand alone.

-**Problem:** Docker containers can't reach host services through `localhost` or `host.docker.internal`
+**Problem:** Docker containers can't reach host services via `localhost` or `host.docker.internal`.
-  - "host.docker.internal:host-gateway"  # Let Docker resolve it
+  - "host.docker.internal:host-gateway"  # Docker resolves host IP dynamically (Linux-friendly)
PR_DRAFT.md (4)

76-90: Ensure .env.example guidance matches the external default ports.

These “change to … if in use” comments imply defaults differ from the compose file. Recommend stating the true defaults explicitly and the alternate suggestions.

-ARCHON_SERVER_PORT=8181  # Change to 9282 if 8181 is in use
-ARCHON_MCP_PORT=8051     # Change to 9151 if 8051 is in use
-ARCHON_AGENTS_PORT=8052  # Change to 9152 if 8052 is in use
-ARCHON_UI_PORT=3737      # Change to 4838 if 3737 is in use
+# Defaults in docker-compose (host/external):
+# ARCHON_SERVER_PORT=9282
+# ARCHON_MCP_PORT=9151
+# ARCHON_AGENTS_PORT=9152
+# ARCHON_UI_PORT=3737
+# Override here to resolve conflicts, e.g.:
+# ARCHON_SERVER_PORT=9400

95-113: Fix checkbox formatting and repeat “Breaking Changes” section.

  • Several checkboxes use [X ]; GitHub does not tick them reliably. Use [x].
  • There are two “Breaking Changes” sections; keep one.
-- [X] Bug fix (non-breaking change which fixes an issue)
+- [x] Bug fix (non-breaking change which fixes an issue)
 ...
-- [X ] Documentation site
+- [x] Documentation site

And remove the duplicate section later in the doc.


66-74: Keep example ports in the script snippet consistent with the actual script and compose.

Your start_archon.sh now prints UI on 3737 and API on 9282 by default; reflect that here.

-echo "  Web UI: http://localhost:${ARCHON_UI_PORT:-3737}"
+echo "  Web UI: http://localhost:${ARCHON_UI_PORT:-3737}"
 echo "  ... etc"

Also consider listing the API Server: 9282 for clarity in the example.


152-154: Remove duplicate “Breaking Changes” block (already present above as ‘None’).

-## Breaking Changes
-<!-- If this PR introduces breaking changes, describe them here -->
-None - all changes are backward compatible with existing deployments.
+
docker-compose.yml (3)

47-53: Nit: tighten quoting/spacing in healthcheck command.

Not functionally wrong, but it avoids “too many spaces after comma” lint warnings and makes quoting easier to read.

-        "python", "-m", "uvicorn", "src.server.main:socket_app", "--host",  "0.0.0.0", "--port", "${ARCHON_SERVER_PORT:-8181}", "--reload",
+        "python","-m","uvicorn","src.server.main:socket_app","--host","0.0.0.0","--port","${ARCHON_SERVER_PORT:-8181}","--reload",

Same style can be applied to other healthcheck/command arrays if you want to silence YAML linters.


162-165: Add a trailing newline and keep network naming consistent.

EOF newline is flagged by YAML linters. Also, consider renaming app-network to supabase_network_Archon in service references to match this name: for clarity, or keep app-network as the reference but document it clearly (current config is valid).

   app-network:
     name: supabase_network_Archon
     driver: bridge
+

25-34: Avoid reusing the same VAR name for both “external host port” and “internal container port” across the project.

Right now ARCHON_SERVER_PORT is used differently in different contexts (host default 9282; container env set to 8181). That increases the risk of misconfiguration (as seen in the frontend defaults). Consider separating names:

  • ARCHON_SERVER_HOST_PORT (default 9282)
  • ARCHON_SERVER_CONTAINER_PORT (fixed 8181, or just hardcode in command)

This is optional but will make docs and scripts unambiguous.

If you want, I can provide a targeted PR patch to apply this rename across compose, the script, and docs.

DEPLOYMENT_SUCCESS.md (6)

41-42: Explicitly mention Linux host-gateway requirement for Ollama.

On Linux, host.docker.internal requires the extra_hosts host-gateway mapping. Call this out next to OLLAMA_HOST to prevent confusion.

Apply this diff:

 OLLAMA_HOST=http://host.docker.internal:11434
+# Note (Linux): requires docker-compose extra_hosts:
+#   "host.docker.internal:host-gateway"

50-55: Add a language to the fenced block (markdownlint MD040).

Specify a language for the architecture diagram to satisfy linters and improve rendering.

-```
+```text
 Archon Containers → supabase_network_Archon ← Supabase Containers
                             ↓
                     Internal Communication
                     (using container names)

---

`61-64`: **Include --build for first run or after compose changes.**

The startup script uses --build; mirror that here to avoid stale images on first run.

```diff
-unset DOCKER_HOST && docker compose up -d
+unset DOCKER_HOST && docker compose up --build -d
 # OR use the startup script:
 ./start_archon.sh

82-88: Clarify that ports may differ based on .env overrides.

Access URLs should reflect the configurable ports to avoid drift when users change defaults.

-### Access Points
+### Access Points
+Ports shown use the defaults; replace with the values you set in .env.

96-99: Soften DOCKER_HOST guidance and add UI internal port for completeness.

“Always unset” is too strong; it’s only needed when DOCKER_HOST points to Podman/remote. Also list UI internal port 5173 with the others.

-Always use `unset DOCKER_HOST` before Docker commands
-Containers use internal ports (8181, 8051, 8052)
+If DOCKER_HOST is set (e.g., Podman or a remote context), run `unset DOCKER_HOST` before Docker commands; otherwise you can skip this.
+Containers use internal ports (5173, 8181, 8051, 8052)
 External ports are mapped for browser access
 All services share `supabase_network_Archon` network

26-31: Good callout on container-name networking; consider cross-linking compose change.

This section reads well. A brief note referencing the compose extra_hosts and the external Supabase-network option would make it airtight.

Would you like me to add a one-liner referencing docker-compose.yml’s network section and extra_hosts?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 86dd1b0 and 81ee4f8.

⛔ Files ignored due to path filters (1)
  • supabase/.temp/cli-latest is excluded by !**/.temp/**
📒 Files selected for processing (6)
  • DEPLOYMENT_SUCCESS.md (1 hunks)
  • DEPLOYMENT_TROUBLESHOOTING.md (1 hunks)
  • PR_DRAFT.md (1 hunks)
  • docker-compose.yml (5 hunks)
  • start_archon.sh (1 hunks)
  • supabase/.branches/_current_branch (1 hunks)
🧰 Additional context used
🪛 LanguageTool
DEPLOYMENT_SUCCESS.md

[grammar] ~3-~3: There might be a mistake here.
Context: ...eployed Archon with Custom Configuration ### Deployment Summary Successfully deployed ...

(QB_NEW_EN)


[grammar] ~5-~5: There might be a mistake here.
Context: ...om Configuration ### Deployment Summary Successfully deployed Archon with local ...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...#### 1. ✅ Fixed Docker Connection Issues - Resolved DOCKER_HOST environment variabl...

(QB_NEW_EN)


[grammar] ~15-~15: There might be a mistake here.
Context: ...✅ Configured Custom Ports (No Conflicts) External → Internal Port Mappings: - W...

(QB_NEW_EN)


[grammar] ~16-~16: There might be a mistake here.
Context: ...ts) External → Internal Port Mappings: - Web UI: 4838 → 5173 - API Server: `928...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ...l → Internal Port Mappings:** - Web UI: 4838 → 5173 - API Server: 9282 → 8181 - MCP Server...

(QB_NEW_EN)


[grammar] ~18-~18: There might be a mistake here.
Context: ...* - Web UI: 4838 → 5173 - API Server: 9282 → 8181 - MCP Server: 9151 → 8051 - Agents Servi...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ...I Server: 9282 → 8181 - MCP Server: 9151 → 8051 - Agents Service: 9152 → 8052 **Avoided...

(QB_NEW_EN)


[grammar] ~22-~22: There might be a mistake here.
Context: ...9152 → 8052 Avoided conflicts with: - Existing Supabase (54321-54327) - CubExp...

(QB_NEW_EN)


[grammar] ~23-~23: There might be a mistake here.
Context: ...ith:** - Existing Supabase (54321-54327) - CubExplorer Streamlit apps (8501, 8504) ...

(QB_NEW_EN)


[grammar] ~26-~26: There might be a mistake here.
Context: ...) #### 3. ✅ Solved Network Connectivity Problem: Archon containers couldn't re...

(QB_NEW_EN)


[grammar] ~44-~44: There might be a mistake here.
Context: ...rnal:11434 ``` #### 5. ✅ Database Setup - Archon tables already initialized in loc...

(QB_NEW_EN)


[grammar] ~82-~82: There might be a mistake here.
Context: ... # Agents Service ``` ### Access Points - Web UI: http://localhost:4838 - **API ...

(QB_NEW_EN)


[grammar] ~83-~83: There might be a mistake here.
Context: ...ints - Web UI: http://localhost:4838 - API Server: http://localhost:9282 - **...

(QB_NEW_EN)


[grammar] ~84-~84: There might be a mistake here.
Context: ... - API Server: http://localhost:9282 - MCP Server: http://localhost:9151 - **...

(QB_NEW_EN)


[grammar] ~85-~85: There might be a mistake here.
Context: ... - MCP Server: http://localhost:9151 - Agents Service: http://localhost:9152 ...

(QB_NEW_EN)


[grammar] ~86-~86: There might be a mistake here.
Context: ...Agents Service*: http://localhost:9152 - Supabase Studio: http://localhost:5432...

(QB_NEW_EN)


[grammar] ~89-~89: There might be a mistake here.
Context: ...: http://localhost:54323 ### Next Steps 1. Open Web UI at http://localhost:4838 2. ...

(QB_NEW_EN)


[grammar] ~95-~95: There might be a mistake here.
Context: ...ing assistants ### Troubleshooting Tips - Always use unset DOCKER_HOST before Do...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...chonnetwork ### Port Mapping Reminder Docker syntax:EXTERNAL:INTERNAL` - Exa...

(QB_NEW_EN)


[grammar] ~102-~102: There might be a mistake here.
Context: ...## Port Mapping Reminder Docker syntax: EXTERNAL:INTERNAL - Example: 4838:5173 means: - Access v...

(QB_NEW_EN)


[grammar] ~103-~103: There might be a mistake here.
Context: ...:INTERNAL- Example:4838:5173means: - Access via browser:localhost:4838` -...

(QB_NEW_EN)


[grammar] ~104-~104: There might be a mistake here.
Context: ...38:5173means: - Access via browser:localhost:4838 - Container listens on:5173` --- *Deplo...

(QB_NEW_EN)

DEPLOYMENT_TROUBLESHOOTING.md

[grammar] ~15-~15: There might be a mistake here.
Context: ...Network Isolation (Most Common on Linux) Problem: Docker containers can't reach...

(QB_NEW_EN)


[grammar] ~37-~37: There might be a mistake here.
Context: ...e ``` #### B. Incorrect Host Resolution Problem: host.docker.internal doesn'...

(QB_NEW_EN)


[grammar] ~84-~84: There might be a mistake here.
Context: ...ainer Health Check Failures Symptoms: - Container shows as (unhealthy) in dock...

(QB_NEW_EN)


[grammar] ~102-~102: There might be a mistake here.
Context: ... 5. Supabase Not Accessible Symptoms: - Can't connect to Supabase from Archon - ...

(QB_NEW_EN)


[grammar] ~104-~104: Ensure spelling is correct
Context: ...ect to Supabase from Archon - API calls timeout Debugging: ```bash # Find Supabase con...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~121-~121: There might be a mistake here.
Context: ...nd Can't Connect to Backend Symptoms: - UI loads but API calls fail - CORS error...

(QB_NEW_EN)


[grammar] ~134-~134: There might be a mistake here.
Context: .... Database Migration Issues Symptoms: - Tables don't exist errors - Missing func...

(QB_NEW_EN)


[grammar] ~157-~157: There might be a mistake here.
Context: ...er bridge IP (172.17.0.1) - May need to configure firewall for Docker ### macOS - `host....

(QB_NEW_EN)


[grammar] ~164-~164: There might be a mistake here.
Context: ...ker Desktop settings ### Windows (WSL2) - Ensure WSL2 backend is enabled in Docker...

(QB_NEW_EN)


[grammar] ~214-~214: There might be a mistake here.
Context: ... ## Getting Help 1. Check logs first: docker compose logs [service-name] 2. Verify network: docker network ls and ...

(QB_NEW_EN)


[grammar] ~215-~215: There might be a mistake here.
Context: ...Verify network: docker network ls and docker network inspect 3. Test connectivity: Use curl or docker ex...

(QB_NEW_EN)


[grammar] ~219-~219: There might be a mistake here.
Context: ...sues on GitHub 6. Create new issue with: - Docker version: docker --version - ...

(QB_NEW_EN)


[grammar] ~220-~220: There might be a mistake here.
Context: ...te new issue with: - Docker version: docker --version - OS and version - Full error logs -...

(QB_NEW_EN)


[grammar] ~221-~221: There might be a mistake here.
Context: ...: docker --version - OS and version - Full error logs - docker-compose.yml ...

(QB_NEW_EN)


[grammar] ~222-~222: There might be a mistake here.
Context: ... - OS and version - Full error logs - docker-compose.yml (sanitized) - .env...

(QB_NEW_EN)


[grammar] ~223-~223: There might be a mistake here.
Context: ...logs - docker-compose.yml (sanitized) - .env (without secrets) ## Common Fixes ...

(QB_NEW_EN)


[grammar] ~228-~228: There might be a mistake here.
Context: ...n Fixes Summary | Problem | Quick Fix | |---------|-----------| | Connection tim...

(QB_NEW_EN)


[grammar] ~229-~229: There might be a mistake here.
Context: ...em | Quick Fix | |---------|-----------| | Connection timeout | Use shared networ...

(QB_NEW_EN)


[grammar] ~230-~230: There might be a mistake here.
Context: ...eout | Use shared network or bridge IP | | Port conflict | Change external ports ...

(QB_NEW_EN)


[grammar] ~231-~231: There might be a mistake here.
Context: ...nflict | Change external ports in .env | | DOCKER_HOST error | Run: `unset DOCKER...

(QB_NEW_EN)


[grammar] ~232-~232: There might be a mistake here.
Context: ..._HOST error | Run: unset DOCKER_HOST | | Unhealthy container | Check logs, veri...

(QB_NEW_EN)


[grammar] ~233-~233: There might be a mistake here.
Context: ...container | Check logs, verify network | | Frontend API errors | Update VITE_API_...

(QB_NEW_EN)


[grammar] ~234-~234: There might be a mistake here.
Context: ...ntend API errors | Update VITE_API_URL | | Database errors | Run migrations | --...

(QB_NEW_EN)

PR_DRAFT.md

[grammar] ~10-~10: There might be a mistake here.
Context: ... Network Connectivity Issues on Linux Problem: Containers couldn't reach host...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...s, causing Supabase connection timeouts. Solution: - Use host-gateway instead...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...pabase connection timeouts. Solution: - Use host-gateway instead of hardcoded ...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ...Port Conflicts with Existing Services Problem: Default ports (3737, 8181, 805...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ...n conflict with other development tools. Solution: - Separate internal (containe...

(QB_NEW_EN)


[grammar] ~19-~19: There might be a mistake here.
Context: ...th other development tools. Solution: - Separate internal (container) ports from...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ... 🐛 DOCKER_HOST Environment Conflicts Problem: Systems with Podman or custom ...

(QB_NEW_EN)


[grammar] ~25-~25: There might be a mistake here.
Context: ...ue to DOCKER_HOST variable interference. Solution: - Add startup script that pro...

(QB_NEW_EN)


[grammar] ~27-~27: There might be a mistake here.
Context: ...HOST variable interference. Solution: - Add startup script that properly handles...

(QB_NEW_EN)


[grammar] ~28-~28: There might be a mistake here.
Context: ...n:** - Add startup script that properly handles Docker environment - Document the need ...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ... ### 4. 🐛 Supabase Network Isolation Problem: When using local Supabase, Arc...

(QB_NEW_EN)


[grammar] ~32-~32: There might be a mistake here.
Context: ...nnot communicate with Supabase services. Solution: - Provide configuration optio...

(QB_NEW_EN)


[grammar] ~34-~34: There might be a mistake here.
Context: ...ate with Supabase services. Solution: - Provide configuration option to join exi...

(QB_NEW_EN)


[grammar] ~35-~35: There might be a mistake here.
Context: ...on:** - Provide configuration option to join existing Supabase network - Document bo...

(QB_NEW_EN)


[style] ~97-~97: Consider using a different verb for a more formal wording.
Context: ... [X] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaki...

(FIX_RESOLVE)


[grammar] ~97-~97: There might be a mistake here.
Context: ...on-breaking change which fixes an issue) - [ ] New feature (non-breaking change whi...

(QB_NEW_EN)


[grammar] ~98-~98: There might be a mistake here.
Context: ...reaking change which adds functionality) - [ ] Breaking change (fix or feature that...

(QB_NEW_EN)


[grammar] ~99-~99: There might be a mistake here.
Context: ...g functionality to not work as expected) - [X] Documentation update - [ ] Performan...

(QB_NEW_EN)


[grammar] ~100-~100: There might be a mistake here.
Context: ... as expected) - [X] Documentation update - [ ] Performance improvement - [ ] Code r...

(QB_NEW_EN)


[grammar] ~101-~101: There might be a mistake here.
Context: ...ion update - [ ] Performance improvement - [ ] Code refactoring ## Affected Servic...

(QB_NEW_EN)


[grammar] ~106-~106: There might be a mistake here.
Context: ...ith an "x" --> - [ ] Frontend (React UI) - [ ] Server (FastAPI backend) - [ ] MCP S...

(QB_NEW_EN)


[grammar] ~107-~107: There might be a mistake here.
Context: ...React UI) - [ ] Server (FastAPI backend) - [ ] MCP Server (Model Context Protocol) ...

(QB_NEW_EN)


[grammar] ~108-~108: There might be a mistake here.
Context: ... [ ] MCP Server (Model Context Protocol) - [ ] Agents (PydanticAI service) - [ ] Da...

(QB_NEW_EN)


[grammar] ~109-~109: There might be a mistake here.
Context: ...tocol) - [ ] Agents (PydanticAI service) - [ ] Database (migrations/schema) - [X] D...

(QB_NEW_EN)


[grammar] ~110-~110: There might be a mistake here.
Context: ...vice) - [ ] Database (migrations/schema) - [X] Docker/Infrastructure - [X ] Documen...

(QB_NEW_EN)


[grammar] ~111-~111: There might be a mistake here.
Context: ...ions/schema) - [X] Docker/Infrastructure - [X ] Documentation site ## Testing <!--...

(QB_NEW_EN)


[grammar] ~116-~116: There might be a mistake here.
Context: ...w you tested your changes --> Tested on: - ✅ Ubuntu 24.04 with Docker 28.3.3 - ✅ Sy...

(QB_NEW_EN)


[grammar] ~117-~117: There might be a mistake here.
Context: ... on: - ✅ Ubuntu 24.04 with Docker 28.3.3 - ✅ System with existing Supabase local de...

(QB_NEW_EN)


[grammar] ~118-~118: There might be a mistake here.
Context: ... with existing Supabase local deployment - ✅ System with Podman installed (DOCKER_H...

(QB_NEW_EN)


[grammar] ~119-~119: There might be a mistake here.
Context: ...nstalled (DOCKER_HOST conflict resolved) - ✅ Multiple services running on default p...

(QB_NEW_EN)


[grammar] ~120-~120: There might be a mistake here.
Context: ...ltiple services running on default ports - [ ] All existing tests pass - [ ] Added ...

(QB_NEW_EN)


[grammar] ~121-~121: There might be a mistake here.
Context: ...ault ports - [ ] All existing tests pass - [ ] Added new tests for new functionalit...

(QB_NEW_EN)


[grammar] ~122-~122: There might be a mistake here.
Context: ... ] Added new tests for new functionality - [X] Manually tested affected user flows ...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ... [X] Manually tested affected user flows - [X ] Docker builds succeed for all servi...

(QB_NEW_EN)


[grammar] ~135-~135: There might be a mistake here.
Context: ... && npm run test ``` ## Breaking Changes None ## Checklist <!-- Mark completed i...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
DEPLOYMENT_SUCCESS.md

8-8: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


50-50: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


67-67: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

DEPLOYMENT_TROUBLESHOOTING.md

148-148: Multiple headings with the same content

(MD024, no-duplicate-heading)

🪛 YAMLlint (1.37.1)
docker-compose.yml

[error] 43-43: duplication of key "extra_hosts" in mapping

(key-duplicates)


[warning] 47-47: too many spaces after comma

(commas)


[warning] 97-97: too many spaces after comma

(commas)


[error] 165-165: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (2)
docker-compose.yml (1)

73-85: Verify the SUPABASE_URL host name manually

Automatic inspection via docker network inspect isn’t available in this environment, so please confirm the actual container name on your Docker network:

– Run

docker-compose config --services

to list all service names.
– Then inspect the network:

docker network inspect supabase_network_Archon | jq '.[0].Containers | keys' -r

Ensure that the host in

- SUPABASE_URL=http://<container_name>:8000

matches exactly the container name you see. If it differs (e.g. it’s supabase-kong rather than supabase_kong_Archon), update all three SUPABASE_URL entries accordingly.

DEPLOYMENT_SUCCESS.md (1)

15-21: Nice: clear external→internal mapping and conflict avoidance.

The port table is concise and aligns with the PR’s goal of avoiding collisions while keeping internal ports stable.

Comment thread DEPLOYMENT_SUCCESS.md
Comment on lines +33 to +42
```bash
# .env configuration
SUPABASE_URL=http://localhost:54321
SUPABASE_SERVICE_KEY=eyJhbGc... # Local Supabase default key
ARCHON_SERVER_PORT=9282
ARCHON_MCP_PORT=9151
ARCHON_AGENTS_PORT=9152
ARCHON_UI_PORT=4838
OLLAMA_HOST=http://host.docker.internal:11434
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct SUPABASE_URL for shared Docker network (localhost:54321 is likely wrong here).

This doc states containers use the shared Supabase network and container-name URLs (Line 30), but the .env sample still points SUPABASE_URL to localhost:54321, which is the Postgres port, not the Supabase REST gateway. For in-network service-to-service calls, use Kong on port 8000 via the container name. Add a remote option for non-local setups.

Apply this diff to fix and clarify:

-# .env configuration
-SUPABASE_URL=http://localhost:54321
-SUPABASE_SERVICE_KEY=eyJhbGc...  # Local Supabase default key
-ARCHON_SERVER_PORT=9282
-ARCHON_MCP_PORT=9151
-ARCHON_AGENTS_PORT=9152
-ARCHON_UI_PORT=4838
-OLLAMA_HOST=http://host.docker.internal:11434
+# .env configuration
+# For shared Docker network (recommended for local dev):
+SUPABASE_URL=http://supabase_kong_Archon:8000
+SUPABASE_SERVICE_KEY=eyJhbGc...  # Local Supabase default key
+# For remote Supabase project, override with your project's URL instead:
+# SUPABASE_URL=https://<your-project-ref>.supabase.co
+ARCHON_SERVER_PORT=9282
+ARCHON_MCP_PORT=9151
+ARCHON_AGENTS_PORT=9152
+ARCHON_UI_PORT=4838
+OLLAMA_HOST=http://host.docker.internal:11434
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```bash
# .env configuration
SUPABASE_URL=http://localhost:54321
SUPABASE_SERVICE_KEY=eyJhbGc... # Local Supabase default key
ARCHON_SERVER_PORT=9282
ARCHON_MCP_PORT=9151
ARCHON_AGENTS_PORT=9152
ARCHON_UI_PORT=4838
OLLAMA_HOST=http://host.docker.internal:11434
```
🤖 Prompt for AI Agents
In DEPLOYMENT_SUCCESS.md around lines 33 to 42, the .env sample incorrectly sets
SUPABASE_URL to localhost:54321 (Postgres port) despite containers using the
shared Supabase network; update the example to use the Supabase Kong gateway via
the service container name and port 8000 (e.g., http://supabase:8000) for
in-network service-to-service calls, and add an alternative note showing a
remote/public SUPABASE_URL option for non-Docker/local setups so users know when
to use localhost vs the container gateway.

Comment on lines +25 to +45
**Solution 2 - Share Supabase Network:**
```yaml
# docker-compose.yml
networks:
app-network:
external: true
name: supabase_network_name # Find with: docker network ls

environment:
- SUPABASE_URL=http://supabase_kong:8000 # Use container name
```

#### B. Incorrect Host Resolution
**Problem:** `host.docker.internal` doesn't work on Linux

**Solution:**
```yaml
# docker-compose.yml
extra_hosts:
- "host.docker.internal:host-gateway" # Let Docker resolve it
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Prefer one consistent example for Supabase addressing and verify the actual service name.

Docs toggle between supabase_kong and supabase_kong_Archon. Confirm the real container name on the shared network and stick to it to prevent copy/paste failures.

To verify, run:

Then update all occurrences in docs and compose to the single correct name (e.g., supabase_kong or supabase-kong) and keep the examples consistent.


🏁 Script executed:

#!/bin/bash
# Inspect the network and list service names reachable by Archon
docker network inspect supabase_network_Archon | jq '.[0].Containers | to_entries[] | .value.Name' -r

Length of output: 200


🏁 Script executed:

#!/bin/bash
# Locate all docker-compose.yml files in the repo and inspect for supabase references
compose_files=$(find . -type f -name 'docker-compose.yml')
if [ -z "$compose_files" ]; then
  echo "No docker-compose.yml found"
  exit 0
fi

for f in $compose_files; do
  echo "----- File: $f -----"
  rg -n 'supabase_' -C3 "$f" || echo "No supabase references in $f"
done

Length of output: 1233


🏁 Script executed:

#!/bin/bash
# Display the full docker-compose.yml to confirm service names and container_name overrides
sed -n '1,200p' docker-compose.yml

Length of output: 5343


Consolidate Supabase Network & Container Naming in Docs

Please update DEPLOYMENT_TROUBLESHOOTING.md so that the Supabase network and container names match those configured in your docker-compose.yml (which uses supabase_network_Archon and supabase_kong_Archon). Also, add a brief reminder to verify the actual names on your machine.

• File: DEPLOYMENT_TROUBLESHOOTING.md (lines 25–45)
– Replace supabase_network_name with supabase_network_Archon.
– Replace http://supabase_kong:8000 with http://supabase_kong_Archon:8000.
– Add a note: “Verify your Supabase network and container names via docker network inspect supabase_network_Archon and adjust accordingly.”

Updated snippet:

 networks:
   app-network:
-    external: true
-    name: supabase_network_name  # Find with: docker network ls
+    external: true
+    name: supabase_network_Archon  # Replace with your actual Supabase network name

 environment:
-  - SUPABASE_URL=http://supabase_kong:8000  # Use container name
+  - SUPABASE_URL=http://supabase_kong_Archon:8000  # Use actual container name

 # (…rest of troubleshooting steps…)

+> **Note:** Container names may be prefixed by your project name.  
+> Run `docker network inspect supabase_network_Archon | jq '.[0].Containers | to_entries[] | .value.Name' -r`  
+> to confirm the correct Supabase container name on your network.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Solution 2 - Share Supabase Network:**
```yaml
# docker-compose.yml
networks:
app-network:
external: true
name: supabase_network_name # Find with: docker network ls
environment:
- SUPABASE_URL=http://supabase_kong:8000 # Use container name
```
#### B. Incorrect Host Resolution
**Problem:** `host.docker.internal` doesn't work on Linux
**Solution:**
```yaml
# docker-compose.yml
extra_hosts:
- "host.docker.internal:host-gateway" # Let Docker resolve it
```
**Solution 2 - Share Supabase Network:**
🧰 Tools
🪛 LanguageTool

[grammar] ~37-~37: There might be a mistake here.
Context: ...e ``` #### B. Incorrect Host Resolution Problem: host.docker.internal doesn'...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In DEPLOYMENT_TROUBLESHOOTING.md around lines 25 to 45, the doc uses generic
Supabase network/container names that don't match our docker-compose; update the
references so they match the actual names: replace supabase_network_name with
supabase_network_Archon and replace http://supabase_kong:8000 with
http://supabase_kong_Archon:8000, and add a one-line reminder to verify and
adjust names on the host (e.g., “Verify your Supabase network and container
names via docker network inspect supabase_network_Archon and docker ps and
adjust accordingly”).

Comment on lines +127 to +130
# docker-compose.yml - Ensure frontend knows external port
environment:
- VITE_API_URL=http://localhost:${ARCHON_SERVER_PORT:-8181}
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Align VITE_API_URL default with the new external server port default (9282).

Else, the UI will point at 8181 while archon-server listens on 9282 by default.

-  - VITE_API_URL=http://localhost:${ARCHON_SERVER_PORT:-8181}
+  - VITE_API_URL=http://localhost:${ARCHON_SERVER_PORT:-9282}
🤖 Prompt for AI Agents
In DEPLOYMENT_TROUBLESHOOTING.md around lines 127 to 130, the VITE_API_URL
default in the docker-compose example still points to port 8181 while the server
default was changed to 9282; update the example so the environment line uses
VITE_API_URL=http://localhost:${ARCHON_SERVER_PORT:-9282} (or otherwise document
9282 as the external port) to keep the frontend default aligned with the new
server port.

Comment on lines +175 to +181
# Check port availability
netstat -tuln | grep -E "8181|8051|8052|3737"

# Test service health
curl http://localhost:${ARCHON_SERVER_PORT:-8181}/health
curl http://localhost:${ARCHON_AGENTS_PORT:-8052}/health

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Update “port availability” and health test commands to the new external defaults.

The earlier ports (8181/8051/8052) are internal container ports; externally you mapped to 9282/9151/9152. Keep UI at 3737 unless you change compose.

-# Check port availability
-netstat -tuln | grep -E "8181|8051|8052|3737"
+# Check port availability (external host ports)
+ss -tulpen | rg -nP '(?<=:)(9282|9151|9152|3737)\b'
 
 # Test service health
-curl http://localhost:${ARCHON_SERVER_PORT:-8181}/health
-curl http://localhost:${ARCHON_AGENTS_PORT:-8052}/health
+curl http://localhost:${ARCHON_SERVER_PORT:-9282}/health
+curl http://localhost:${ARCHON_AGENTS_PORT:-9152}/health
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Check port availability
netstat -tuln | grep -E "8181|8051|8052|3737"
# Test service health
curl http://localhost:${ARCHON_SERVER_PORT:-8181}/health
curl http://localhost:${ARCHON_AGENTS_PORT:-8052}/health
# Check port availability (external host ports)
ss -tulpen | rg -nP '(?<=:)(9282|9151|9152|3737)\b'
# Test service health
curl http://localhost:${ARCHON_SERVER_PORT:-9282}/health
curl http://localhost:${ARCHON_AGENTS_PORT:-9152}/health
🤖 Prompt for AI Agents
In DEPLOYMENT_TROUBLESHOOTING.md around lines 175 to 181, the port availability
and health test commands still reference internal container ports
(8181/8051/8052); update them to the external mapped defaults 9282 (server),
9151 (agents health port mapping for services previously 8051/8052) while
keeping the UI port at 3737 unless docker-compose was changed, and update the
netstat and curl examples to use 9282/9151/9152 and 3737 accordingly so the docs
match the external port mappings.

Comment on lines +195 to +210
```bash
# Required
SUPABASE_URL= # Your Supabase instance URL
SUPABASE_SERVICE_KEY= # Service role key (not anon key)

# Optional - Ports (defaults shown)
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737

# Optional - Services
OPENAI_API_KEY= # For OpenAI models
OLLAMA_HOST= # For local Ollama
LOG_LEVEL=INFO # DEBUG for more details
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Environment variable defaults should reflect external port mappings.

These are presented as “defaults,” but your docker-compose maps external defaults to 9282/9151/9152 (UI remains 3737). Update to avoid operator mistakes.

 # Optional - Ports (defaults shown)
-ARCHON_SERVER_PORT=8181
-ARCHON_MCP_PORT=8051
-ARCHON_AGENTS_PORT=8052
-ARCHON_UI_PORT=3737
+ARCHON_SERVER_PORT=9282
+ARCHON_MCP_PORT=9151
+ARCHON_AGENTS_PORT=9152
+ARCHON_UI_PORT=3737
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```bash
# Required
SUPABASE_URL= # Your Supabase instance URL
SUPABASE_SERVICE_KEY= # Service role key (not anon key)
# Optional - Ports (defaults shown)
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737
# Optional - Services
OPENAI_API_KEY= # For OpenAI models
OLLAMA_HOST= # For local Ollama
LOG_LEVEL=INFO # DEBUG for more details
```
🤖 Prompt for AI Agents
In DEPLOYMENT_TROUBLESHOOTING.md around lines 195 to 210, the listed “defaults”
for ARCHON_SERVER_PORT, ARCHON_MCP_PORT and ARCHON_AGENTS_PORT currently show
internal container ports but your docker-compose exposes external ports 9282,
9151 and 9152; update the documented defaults to reflect the external mappings
(ARCHON_SERVER_PORT=9282, ARCHON_MCP_PORT=9151, ARCHON_AGENTS_PORT=9152) while
keeping ARCHON_UI_PORT=3737 and add a brief parenthetical note that these are
external host ports mapped to container ports to avoid operator confusion.

Comment thread docker-compose.yml
Comment on lines 22 to 24
ports:
- "${ARCHON_SERVER_PORT:-8181}:${ARCHON_SERVER_PORT:-8181}"
- "${ARCHON_SERVER_PORT:-9282}:8181"
environment:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

External server port default is 9282 — ensure all consumers use 9282 when env is unset.

This is correct here, but the frontend currently points to 8181 by default (see Lines 145–147). Align the frontend env to 9282 to avoid broken UI on fresh setups.

-  - "${ARCHON_SERVER_PORT:-9282}:8181"
+  - "${ARCHON_SERVER_PORT:-9282}:8181"

No change needed in this stanza; fix the frontend stanza below.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docker-compose.yml around lines 145–147 (frontend service env), the frontend
currently defaults to 8181 while the server external port default is 9282;
update the frontend environment value that points to the server to use the same
default by replacing the hardcoded 8181 with the environment expression that
uses ARCHON_SERVER_PORT fallback to 9282 (i.e., ensure the frontend uses
"${ARCHON_SERVER_PORT:-9282}" or the equivalent env var reference), and scan for
any other hardcoded 8181 in the compose file to align them to the 9282 default.

Comment thread docker-compose.yml
Comment on lines +36 to 45
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:

- /var/run/docker.sock:/var/run/docker.sock # Docker socket for MCP container control
- ./python/src:/app/src # Mount source code for hot reload
- ./python/tests:/app/tests # Mount tests for UI test execution
extra_hosts:
- "host.docker.internal:host-gateway"
command:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Duplicate extra_hosts keys under archon-server (YAML duplicate key) — one will be ignored.

Keep a single extra_hosts block to satisfy YAML linters and avoid confusion.

-    extra_hosts:
-      - "host.docker.internal:host-gateway"
 ...
-    extra_hosts:
-      - "host.docker.internal:host-gateway"
+    extra_hosts:
+      - "host.docker.internal:host-gateway"

I.e., remove the first block and keep the one after volumes (or vice versa).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker socket for MCP container control
- ./python/src:/app/src # Mount source code for hot reload
- ./python/tests:/app/tests # Mount tests for UI test execution
extra_hosts:
- "host.docker.internal:host-gateway"
command:
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Docker socket for MCP container control
- ./python/src:/app/src # Mount source code for hot reload
- ./python/tests:/app/tests # Mount tests for UI test execution
extra_hosts:
- "host.docker.internal:host-gateway"
command:
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 43-43: duplication of key "extra_hosts" in mapping

(key-duplicates)

🤖 Prompt for AI Agents
In docker-compose.yml around lines 36 to 45, there are two duplicate extra_hosts
keys under the archon-server service which causes a YAML duplicate-key issue;
remove one of the extra_hosts blocks so only a single extra_hosts entry remains
(either keep the one before volumes or the one after volumes), ensuring the
remaining extra_hosts contains the required mapping
("host.docker.internal:host-gateway") and preserving surrounding indentation and
order of keys.

Comment thread PR_DRAFT.md
Comment on lines +46 to +63
### 1. Updated `docker-compose.yml`
```yaml
# Separated internal and external ports
ports:
- "${ARCHON_SERVER_PORT:-8181}:8181" # External can change, internal stays consistent

# Fixed host.docker.internal for Linux
extra_hosts:
- "host.docker.internal:host-gateway" # Works on all platforms Tested only on ubuntu

# Network configuration options
networks:
app-network:
driver: bridge # Default isolated network
# OR for Supabase integration:
# external: true
# name: supabase_network_name
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Make the example reflect actual compose defaults (external 9282).

The snippet currently shows external default 8181, which contradicts your compose file (9282). Align to prevent onboarding friction.

-ports:
-  - "${ARCHON_SERVER_PORT:-8181}:8181"  # External can change, internal stays consistent
+ports:
+  - "${ARCHON_SERVER_PORT:-9282}:8181"  # External can change, internal stays consistent

Also fix the comment punctuation:

-  - "host.docker.internal:host-gateway"  # Works on all platforms Tested only on ubuntu
+  - "host.docker.internal:host-gateway"  # Works cross‑platform. Tested on Ubuntu.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### 1. Updated `docker-compose.yml`
```yaml
# Separated internal and external ports
ports:
- "${ARCHON_SERVER_PORT:-8181}:8181" # External can change, internal stays consistent
# Fixed host.docker.internal for Linux
extra_hosts:
- "host.docker.internal:host-gateway" # Works on all platforms Tested only on ubuntu
# Network configuration options
networks:
app-network:
driver: bridge # Default isolated network
# OR for Supabase integration:
# external: true
# name: supabase_network_name
```
### 1. Updated `docker-compose.yml`
🤖 Prompt for AI Agents
In PR_DRAFT.md around lines 46 to 63, the docker-compose example uses an
external port default of 8181 and has inconsistent/misplaced comment
punctuation; update the external port mapping to
"${ARCHON_SERVER_PORT:-9282}:8181" to match the actual compose defaults and
adjust the comments to be grammatically correct (e.g., "External can change,
internal stays consistent." and "Works on all platforms; tested on Ubuntu.").
Ensure comments use proper sentence punctuation and capitalization.

Comment thread start_archon.sh Outdated
Comment thread start_archon.sh
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@coleam00
Copy link
Copy Markdown
Owner

PR looks nice but also a lot of md files and other things that need to be cleaned up!

@Wirasm
Copy link
Copy Markdown
Collaborator

Wirasm commented Sep 4, 2025

@hebelmx
Thank you for this contribution, i will close this, feel free to reopen it once the md files are cleaned up and conflicts are resolved

@Wirasm Wirasm closed this Sep 4, 2025
@mattmeye
Copy link
Copy Markdown

mattmeye commented Sep 27, 2025

I have podman and macos - it does not work fully. MCP Dashboard is not loading.

POWERFULMOVES added a commit to POWERFULMOVES/PMOVES-Archon that referenced this pull request Feb 12, 2026
…ensorzero-cloudflare

docs: align Cataclysm brand blueprint with repo state
coleam00 pushed a commit that referenced this pull request Apr 7, 2026
* Investigate issue #193: Check for existing PR before creating new one

* Fix: Check for existing PR before creating new one (#193)

The implement-issue workflow previously created duplicate PRs when run
multiple times for the same issue, as evidenced by issue #124 creating
both PR #186 and PR #190. This happened because the workflow had no
check to see if a PR already existed before running 'gh pr create'.

Changes:
- Added Phase 6.5: Check for existing PR on current branch using gh pr list
- Made Phase 7 conditional - skips PR creation if one already exists
- Updated Phase 7.3 to handle PR variables from both new and existing PRs
- Updated Phase 7 checkpoint to reflect that PR may exist or be created
- Updated edge case handling to clarify PR creation failures should be rare

The fix follows the pattern from worktree-cleanup.md which uses
'gh pr list --head "$BRANCH" --state all' to find PRs for a branch.

Fixes #193

* Archive investigation for issue #193

* Simplify: Use prompt instruction instead of bash scripting

Replace complex Phase 6.5 bash logic with a simple instruction telling
the agent to check for existing PRs before creating one. The agent can
use gh pr list and reason about the results.

This follows KISS - the agent doesn't need explicit bash scripting to
perform a simple check it can already do through reasoning.

Fixes #193
Tyone88 pushed a commit to Tyone88/Archon that referenced this pull request Apr 16, 2026
…leam00#195)

* Investigate issue coleam00#193: Check for existing PR before creating new one

* Fix: Check for existing PR before creating new one (coleam00#193)

The implement-issue workflow previously created duplicate PRs when run
multiple times for the same issue, as evidenced by issue coleam00#124 creating
both PR coleam00#186 and PR coleam00#190. This happened because the workflow had no
check to see if a PR already existed before running 'gh pr create'.

Changes:
- Added Phase 6.5: Check for existing PR on current branch using gh pr list
- Made Phase 7 conditional - skips PR creation if one already exists
- Updated Phase 7.3 to handle PR variables from both new and existing PRs
- Updated Phase 7 checkpoint to reflect that PR may exist or be created
- Updated edge case handling to clarify PR creation failures should be rare

The fix follows the pattern from worktree-cleanup.md which uses
'gh pr list --head "$BRANCH" --state all' to find PRs for a branch.

Fixes coleam00#193

* Archive investigation for issue coleam00#193

* Simplify: Use prompt instruction instead of bash scripting

Replace complex Phase 6.5 bash logic with a simple instruction telling
the agent to check for existing PRs before creating one. The agent can
use gh pr list and reason about the results.

This follows KISS - the agent doesn't need explicit bash scripting to
perform a simple check it can already do through reasoning.

Fixes coleam00#193
joaobmonteiro pushed a commit to joaobmonteiro/Archon that referenced this pull request Apr 26, 2026
…leam00#195)

* Investigate issue coleam00#193: Check for existing PR before creating new one

* Fix: Check for existing PR before creating new one (coleam00#193)

The implement-issue workflow previously created duplicate PRs when run
multiple times for the same issue, as evidenced by issue coleam00#124 creating
both PR coleam00#186 and PR coleam00#190. This happened because the workflow had no
check to see if a PR already existed before running 'gh pr create'.

Changes:
- Added Phase 6.5: Check for existing PR on current branch using gh pr list
- Made Phase 7 conditional - skips PR creation if one already exists
- Updated Phase 7.3 to handle PR variables from both new and existing PRs
- Updated Phase 7 checkpoint to reflect that PR may exist or be created
- Updated edge case handling to clarify PR creation failures should be rare

The fix follows the pattern from worktree-cleanup.md which uses
'gh pr list --head "$BRANCH" --state all' to find PRs for a branch.

Fixes coleam00#193

* Archive investigation for issue coleam00#193

* Simplify: Use prompt instruction instead of bash scripting

Replace complex Phase 6.5 bash logic with a simple instruction telling
the agent to check for existing PRs before creating one. The agent can
use gh pr list and reason about the results.

This follows KISS - the agent doesn't need explicit bash scripting to
perform a simple check it can already do through reasoning.

Fixes coleam00#193
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.

4 participants