feat: switch GitHub Actions to build optimized Docker image by default

- Change main build to use Dockerfile.optimized (targets ~200MB image)
- Add separate 'full' build job for development variant (2.6GB)
- Update tagging strategy: 'latest' for optimized, 'full' suffix for full variant
- Update documentation to reflect dual image strategy
- Update docker-compose.yml with variant selection comment

This provides users with two options:
- Optimized (default): Pre-built database, minimal size, for production
- Full: Complete n8n packages, dynamic scanning, for development

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-06-14 11:27:24 +02:00
parent 3ab8fbd60b
commit e90971b2d8
5 changed files with 108 additions and 13 deletions

View File

@@ -33,10 +33,11 @@ curl http://localhost:3000/health
### 2. Using Pre-built Images
Pre-built images are available on GitHub Container Registry:
Pre-built images are available on GitHub Container Registry in two variants:
#### Optimized Image (Recommended)
```bash
# Pull the latest image
# Pull the optimized image (~200MB)
docker pull ghcr.io/czlonkowski/n8n-mcp:latest
# Run with HTTP mode
@@ -45,10 +46,24 @@ docker run -d \
-e MCP_MODE=http \
-e AUTH_TOKEN=your-secure-token \
-p 3000:3000 \
-v n8n-mcp-data:/app/data \
ghcr.io/czlonkowski/n8n-mcp:latest
```
#### Full Image (Development)
```bash
# Pull the full image with n8n packages (2.6GB)
docker pull ghcr.io/czlonkowski/n8n-mcp:full
# Run with dynamic node scanning capability
docker run -d \
--name n8n-mcp-full \
-e MCP_MODE=http \
-e AUTH_TOKEN=your-secure-token \
-p 3000:3000 \
-v n8n-mcp-data:/app/data \
ghcr.io/czlonkowski/n8n-mcp:full
```
## 📋 Configuration Options
### Environment Variables
@@ -424,14 +439,31 @@ secrets:
## 📦 Available Images
- `ghcr.io/czlonkowski/n8n-mcp:latest` - Latest stable release
- `ghcr.io/czlonkowski/n8n-mcp:2.3.0` - Specific version
- `ghcr.io/czlonkowski/n8n-mcp:main-abc123` - Development builds
### Optimized Images (~200MB)
- `ghcr.io/czlonkowski/n8n-mcp:latest` - Latest optimized release
- `ghcr.io/czlonkowski/n8n-mcp:2.3.0` - Specific version (optimized)
- `ghcr.io/czlonkowski/n8n-mcp:main-abc123` - Development builds (optimized)
### Full Images (2.6GB)
- `ghcr.io/czlonkowski/n8n-mcp:full` - Latest full release
- `ghcr.io/czlonkowski/n8n-mcp:2.3.0-full` - Specific version (full)
- `ghcr.io/czlonkowski/n8n-mcp:main-full` - Development builds (full)
### Image Details
#### Optimized Variant
- Base: `node:20-alpine`
- Size: ~150MB compressed
- Size: ~200MB compressed
- Features: Pre-built database, minimal runtime
- Use case: Production deployments
#### Full Variant
- Base: `node:20-alpine`
- Size: ~2.6GB compressed
- Features: Full n8n packages, dynamic scanning
- Use case: Development, custom nodes
Both variants:
- Architectures: `linux/amd64`, `linux/arm64`
- Updated: Automatically via GitHub Actions

View File

@@ -15,11 +15,18 @@ git push origin v1.2.3
```
This will automatically create the following Docker tags:
**Optimized Images:**
- `ghcr.io/czlonkowski/n8n-mcp:1.2.3` (exact version)
- `ghcr.io/czlonkowski/n8n-mcp:1.2` (minor version)
- `ghcr.io/czlonkowski/n8n-mcp:1` (major version)
- `ghcr.io/czlonkowski/n8n-mcp:latest` (if from main branch)
**Full Images:**
- `ghcr.io/czlonkowski/n8n-mcp:1.2.3-full` (exact version)
- `ghcr.io/czlonkowski/n8n-mcp:1.2-full` (minor version)
- `ghcr.io/czlonkowski/n8n-mcp:full` (if from main branch)
## Tag Types Explained
### Latest Tag