Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
59d66d9
Fix MCP host configuration for LAN deployment - use environment varia…
dmcdonald11 Sep 10, 2025
1f7a439
Fix MCP service discovery to use environment variables instead of har…
dmcdonald11 Sep 10, 2025
caa9805
Add missing VITE_MCP_USE_PROXY environment variable to archon-server
dmcdonald11 Sep 10, 2025
673f682
Fix MCP config endpoint to use service discovery instead of direct en…
dmcdonald11 Sep 10, 2025
9afe278
Fix HOST environment variable being overridden by database settings
dmcdonald11 Sep 10, 2025
37645b2
Add multi-stage Dockerfile for frontend with development and producti…
dmcdonald11 Sep 10, 2025
49fbe6f
Enable Docker socket access in LAN production environment
dmcdonald11 Sep 10, 2025
d1dec87
Document LAN deployment fixes and configuration
dmcdonald11 Sep 10, 2025
e76d915
Consolidate remote deployment configuration and cleanup
dmcdonald11 Sep 10, 2025
2beb592
Add .env.unified.local configuration file
dmcdonald11 Sep 10, 2025
e742baa
Update .env.unified.local
dmcdonald11 Sep 10, 2025
8c7471e
Add Traefik configuration documentation
dmcdonald11 Sep 10, 2025
42e8eba
Merge branch 'remote-setup' of https://github.com/dmcdonald11/ArchonD…
dmcdonald11 Sep 10, 2025
cc463f9
Merge remote main branch with remote deployment features
dmcdonald11 Sep 10, 2025
08381a4
Update documentation for unified deployment
dmcdonald11 Sep 10, 2025
c24d6ac
Correct documentation inaccuracies in unified deployment approach
dmcdonald11 Sep 10, 2025
79383ef
Update .gitignore and documentation
dmcdonald11 Sep 16, 2025
48308fa
Merge upstream changes from coleam00/Archon main branch
dmcdonald11 Sep 16, 2025
80a4779
Update CLAUDE.md with Byterover instructions
dmcdonald11 Sep 16, 2025
cd0d99b
Merge upstream changes while preserving LAN functionality
dmcdonald11 Sep 19, 2025
8d5d046
modified: CLAUDE.md
dmcdonald11 Sep 29, 2025
a088e97
new file: CrawlProcess.md
dmcdonald11 Nov 26, 2025
ee35249
Merge pull request #2 from dmcdonald11/dm-upd-localsupabase
dmcdonald11 Nov 26, 2025
797a6b2
modified: docker-compose.unified.yml
dmcdonald11 Nov 26, 2025
ec84a83
Merge pull request #3 from dmcdonald11/dm-upd-localsupabase
dmcdonald11 Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,60 @@ SUPABASE_SERVICE_KEY=
LOGFIRE_TOKEN=
LOG_LEVEL=INFO



###################################################################
###################################################################
### LocalHost deployment
###################################################################
###################################################################
# Phase 1 Parameterization Variables
# HOST: Service host for service discovery in local development (default: localhost)
HOST=localhost

# BIND_IP: IP address to bind Docker ports to (empty = all interfaces, 127.0.0.1 = localhost only)
# Leave empty for LAN access, set to 127.0.0.1 to restrict to localhost only
BIND_IP=

Comment on lines +41 to +44
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

BIND_IP guidance is inverted vs docker-compose defaults.

docker-compose.yml uses "${BIND_IP:-127.0.0.1}" so leaving BIND_IP empty binds to localhost, not LAN. Either update docs to say "set 0.0.0.0 for LAN" or change compose to default to 0.0.0.0. I recommend doc fix to keep safe-by-default localhost.

Apply this doc fix:

-# BIND_IP: IP address to bind Docker ports to (empty = all interfaces, 127.0.0.1 = localhost only)
-# Leave empty for LAN access, set to 127.0.0.1 to restrict to localhost only
-BIND_IP=
+# BIND_IP: IP address to bind Docker ports to
+# Default behavior (empty) binds to 127.0.0.1 due to docker-compose defaults.
+# Set to 0.0.0.0 for LAN access, or 127.0.0.1 to restrict to localhost.
+BIND_IP=
πŸ“ 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
# BIND_IP: IP address to bind Docker ports to (empty = all interfaces, 127.0.0.1 = localhost only)
# Leave empty for LAN access, set to 127.0.0.1 to restrict to localhost only
BIND_IP=
# BIND_IP: IP address to bind Docker ports to
# Default behavior (empty) binds to 127.0.0.1 due to docker-compose defaults.
# Set to 0.0.0.0 for LAN access, or 127.0.0.1 to restrict to localhost.
BIND_IP=
πŸ€– Prompt for AI Agents
In .env.example around lines 41 to 44, the current comments incorrectly state
that leaving BIND_IP empty binds to all interfaces; in fact docker-compose.yml
uses "${BIND_IP:-127.0.0.1}" so an empty value defaults to 127.0.0.1
(localhost). Update the comment text to state that leaving BIND_IP empty
restricts to localhost (127.0.0.1), set BIND_IP=0.0.0.0 to allow LAN access, and
keep the note that 127.0.0.1 restricts to localhost to preserve safe-by-default
behavior.

# CORS_ORIGINS: Comma-separated list of allowed CORS origins (default: http://localhost:3737)
# Example for LAN: CORS_ORIGINS=http://localhost:3737,http://192.168.1.100:3737
CORS_ORIGINS=http://localhost:3737

# API_BASE_URL: Base URL for API service (default: http://localhost:8181)
# Example for LAN: API_BASE_URL=http://192.168.1.100:8181
API_BASE_URL=http://localhost:8181
###################################################################
###################################################################
### HomeLab/Lan deployment
###################################################################
###################################################################
# Network binding - bind to all interfaces for LAN access
#BIND_IP=0.0.0.0

# Domain configuration for yourdomain.com
#HOST=archon.yourdomain.com

# CORS - allow access from the domain
#CORS_ORIGINS=https://archon.yourdomain.com

# API base URL for internal service communication
#API_BASE_URL=https://archon.yourdomain.com/api

# Service Ports Configuration
# These ports are used for external access to the services
HOST=localhost
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737
ARCHON_DOCS_PORT=3838

# MCP Configuration for local development
# These are used by the frontend to connect to the MCP server
VITE_MCP_HOST=localhost
VITE_MCP_PROTOCOL=http
VITE_MCP_USE_PROXY=false
VITE_MCP_PORT=8051

# Frontend Configuration
# VITE_ALLOWED_HOSTS: Comma-separated list of additional hosts allowed for Vite dev server
# Example: VITE_ALLOWED_HOSTS=192.168.1.100,myhost.local,example.com
Expand Down
64 changes: 64 additions & 0 deletions .env.unified.lan
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# LAN/Production Configuration
# Copy to .env for LAN deployment

# ========================================
# REQUIRED: Database Connection
# ========================================
SUPABASE_URL=your database link
SUPABASE_SERVICE_KEY=Your Key

# ========================================
# Deployment Mode: LAN/PRODUCTION
# ========================================
DEPLOYMENT_MODE=lan
BUILD_TARGET=production
NODE_ENV=production

# ========================================
# Network Configuration - UPDATE YOUR DOMAIN
# ========================================
HOST=archon.YourDomainName.com
BIND_IP=0.0.0.0
CORS_ORIGINS=https://archon.yourdomain.com
API_BASE_URL=https://archon.yourdomain.com/api
VITE_API_URL=https://archon.yourdomain.com

# ========================================
# MCP Configuration for LAN
# ========================================
VITE_MCP_HOST=archon.yourdomainname.com
VITE_MCP_PROTOCOL=https
VITE_MCP_USE_PROXY=true
VITE_MCP_PORT=8051

# ========================================
# Service Ports (internal)
# ========================================
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737
VITE_ARCHON_SERVER_PORT=

# ========================================
# Production Settings
# ========================================
DOCKER_SOCKET=/var/run/docker.sock
PROD=true
# Use prod profile for production without volume mounts
COMPOSE_PROFILES=prod

# ========================================
# Network Configuration (LAN/Traefik)
# ========================================
# Use external Traefik proxy network
PROXY_EXTERNAL=true
PROXY_NETWORK=proxy

# ========================================
# Optional Features
# ========================================
AGENTS_ENABLED=false
OPENAI_API_KEY=
LOGFIRE_TOKEN=
LOG_LEVEL=INFO
92 changes: 92 additions & 0 deletions .env.unified.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Local Development Configuration
# Copy to .env for local development

# ========================================
# REQUIRED: Database Connection
# ========================================
# Get your SUPABASE_URL from the Data API section of your Supabase project settings -
# https://supabase.com/dashboard/project/<your project ID>/settings/api
#LOCAL
#SUPABASE_URL=http://10.11.9.234:54321
#WWW
#SUPABASE_URL=https://supabase.com/dashboard/project/ywqhytytvsugasmbpdfa/settings/api
#SUPABASE_URL=https://supabase.com/dashboard/project/ywqhytytvsugasmbpdfa/settings/api
#http://127.0.0.1:54321
#http://127.0.0.1:54321
SUPABASE_URL=supabaseLink
Comment on lines +7 to +16
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

Misleading SUPABASE_URL examples (risk of misconfig).

The commented examples point to the Supabase dashboard URL, not the actual project API URL. This will lead to failed connections. Replace with correct examples and remove the real-looking project ref.

Apply:

-#WWW
-#SUPABASE_URL=https://supabase.com/dashboard/project/ywqhytytvsugasmbpdfa/settings/api
-#SUPABASE_URL=https://supabase.com/dashboard/project/ywqhytytvsugasmbpdfa/settings/api
-#http://127.0.0.1:54321
-#http://127.0.0.1:54321
+# Hosted (Project URL from Settings β†’ API):
+#SUPABASE_URL=https://<project-ref>.supabase.co
+# Local Supabase (via supabase start):
+#SUPABASE_URL=http://127.0.0.1:54321

Also applies to: 35-36

πŸ€– Prompt for AI Agents
.env.unified.local around lines 7 to 16 (also apply same change to lines 35-36):
the commented SUPABASE_URL examples point to the Supabase dashboard/settings
pages (misleading) and include a real-looking project ref; replace those
comments with correct examples showing the actual API/REST/edge URL formats
(e.g. https://<project-ref>.supabase.co or
https://<project-ref>.supabase.co/rest/v1) or localhost variants
(http://127.0.0.1:54321), remove any real project refs, and ensure the
SUPABASE_URL value example is clearly marked as placeholder (e.g.
SUPABASE_URL=https://<project-ref>.supabase.co) to avoid misconfiguration.


# ⚠️ CRITICAL: You MUST use the SERVICE ROLE key, NOT the Anon key! ⚠️
#
# COMMON MISTAKE: Using the anon (public) key will cause ALL saves to fail with "permission denied"!
#
# How to get the CORRECT key:
# 1. Go to: https://supabase.com/dashboard/project/<your project ID>/settings/api
# 2. In the Settings menu, click on "API keys"
# 3. Find "Project API keys" section
# 4. You will see TWO keys - choose carefully:
# ❌ anon (public): WRONG - This is shorter, starts with "eyJhbGc..." and contains "anon" in the JWT
# βœ… service_role (secret): CORRECT - This is longer and contains "service_role" in the JWT
#
# The service_role key is typically much longer than the anon key.
# If you see errors like "Failed to save" or "Permission denied", you're using the wrong key!
#
# On the Supabase dashboard, it's labeled as "service_role" under "Project API keys"

#www
SUPABASE_SERVICE_KEY=supabaseKey


# ========================================
# Deployment Mode: LOCAL
# ========================================
DEPLOYMENT_MODE=local
BUILD_TARGET=development
NODE_ENV=development

# ========================================
# Network Configuration
# ========================================
HOST=localhost
BIND_IP=127.0.0.1
CORS_ORIGINS=http://localhost:3737
API_BASE_URL=http://localhost:8181
VITE_API_URL=http://localhost:8181

# ========================================
# MCP Configuration
# ========================================
VITE_MCP_HOST=localhost
VITE_MCP_PROTOCOL=http
VITE_MCP_USE_PROXY=false
VITE_MCP_PORT=8051

# ========================================
# Service Ports
# ========================================
ARCHON_SERVER_PORT=8181
ARCHON_MCP_PORT=8051
ARCHON_AGENTS_PORT=8052
ARCHON_UI_PORT=3737

# ========================================
# Development Features
# ========================================
DOCKER_SOCKET=/var/run/docker.sock
PROD=false
# Use dev profile for development with volume mounts
COMPOSE_PROFILES=dev

# ========================================
# Network Configuration (Local)
# ========================================
# No external proxy network needed for local development
PROXY_EXTERNAL=false
PROXY_NETWORK=proxy-internal

# ========================================
# Optional Features
# ========================================
AGENTS_ENABLED=false
OPENAI_API_KEY=
LOGFIRE_TOKEN=
LOG_LEVEL=INFO
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ PRPs/local
PRPs/completed/
PRPs/stories/
/logs/
.bmad-core
lan-migration-docs/
.zed
tmp/
temp/
.clinerules/byterover-rules.md
.kilocode/rules/byterover-rules.md
.roo/rules/byterover-rules.md
.windsurf/rules/byterover-rules.md
.cursor/rules/byterover-rules.mdc
.kiro/steering/byterover-rules.md
.qoder/rules/byterover-rules.md
.augment/rules/byterover-rules.md
.claude/
.cursor/
CLAUDE.md
UAT/

.DS_Store
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"notebook.defaultFormatter": null
}
Loading