fix: address code review feedback for Docker consolidation

- Improved GitHub Actions test to verify N8N_MODE environment variable
- Added explanatory comment in docker-compose.n8n.yml
- Added Docker Build Changes section to deployment documentation
- Explains the consolidation benefits and rationale for users
This commit is contained in:
czlonkowski
2025-08-02 11:54:33 +02:00
parent 3eecda4bd5
commit 6856add177
3 changed files with 11 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ jobs:
- name: Test Docker image
run: |
# Test that the image starts correctly with N8N_MODE
docker run --rm \
-e N8N_MODE=true \
-e MCP_MODE=http \
@@ -90,7 +91,7 @@ jobs:
-e MCP_AUTH_TOKEN=test-token-minimum-32-chars-long \
-e AUTH_TOKEN=test-token-minimum-32-chars-long \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
node dist/mcp/index.js --version
node -e "console.log('N8N_MODE:', process.env.N8N_MODE); process.exit(0);"
- name: Test health endpoint
run: |

View File

@@ -32,7 +32,7 @@ services:
n8n-mcp:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile # Uses standard Dockerfile with N8N_MODE=true env var
image: ghcr.io/${GITHUB_REPOSITORY:-czlonkowski/n8n-mcp}/n8n-mcp:${VERSION:-latest}
container_name: n8n-mcp
restart: unless-stopped

View File

@@ -93,6 +93,14 @@ curl http://localhost:3001/mcp
*Required only for workflow management features. Documentation tools work without these.
## Docker Build Changes (v2.9.2+)
Starting with version 2.9.2, we use a single optimized Dockerfile for all deployments:
- The previous `Dockerfile.n8n` has been removed as redundant
- N8N_MODE functionality is enabled via the `N8N_MODE=true` environment variable
- This reduces image size by 500MB+ and improves build times from 8+ minutes to 1-2 minutes
- All examples now use the standard `Dockerfile`
## Production Deployment
### Same Server as n8n