refactor: consolidate Docker builds by removing redundant Dockerfile.n8n

- Research proved n8n packages are NOT required at runtime for N8N_MODE
- The 'n8n' CMD argument was vestigial and completely ignored by code
- N8N_MODE only affects protocol negotiation, not runtime functionality
- Standard Dockerfile works perfectly with N8N_MODE=true

Benefits:
- Eliminates 500MB+ of unnecessary n8n packages from Docker images
- Reduces build time from 8+ minutes to 1-2 minutes
- Simplifies maintenance with single Dockerfile
- Improves CI/CD reliability

Updated:
- Removed Dockerfile.n8n
- Updated GitHub Actions to use standard Dockerfile
- Fixed docker-compose.n8n.yml to use standard Dockerfile
- Added missing MCP_MODE=http and AUTH_TOKEN env vars
- Updated all documentation references
This commit is contained in:
czlonkowski
2025-08-02 11:52:04 +02:00
parent 1c6bff7d42
commit 3eecda4bd5
5 changed files with 22 additions and 86 deletions

View File

@@ -109,7 +109,7 @@ git clone https://github.com/czlonkowski/n8n-mcp.git
cd n8n-mcp
# Build Docker image
docker build -f Dockerfile.n8n -t n8n-mcp:latest .
docker build -t n8n-mcp:latest .
# Create a Docker network if n8n uses one
docker network create n8n-net
@@ -197,7 +197,7 @@ Deploy n8n-MCP on a separate server from your n8n instance:
# First, clone and build
git clone https://github.com/czlonkowski/n8n-mcp.git
cd n8n-mcp
docker build -f Dockerfile.n8n -t n8n-mcp:latest .
docker build -t n8n-mcp:latest .
# Generate auth tokens
AUTH_TOKEN=$(openssl rand -hex 32)
@@ -268,7 +268,7 @@ git clone https://github.com/czlonkowski/n8n-mcp.git
cd n8n-mcp
# Build local image
docker build -f Dockerfile.n8n -t n8n-mcp:latest .
docker build -t n8n-mcp:latest .
# Create docker-compose.yml
cat > docker-compose.yml << 'EOF'
@@ -599,7 +599,7 @@ export LOG_LEVEL=info # Logging level
```bash
# Clear Docker cache and rebuild
docker system prune -f
docker build --no-cache -f Dockerfile.n8n -t n8n-mcp:latest .
docker build --no-cache -t n8n-mcp:latest .
```
**Container Runtime Issues**