Files
n8n-mcp/.dockerignore
czlonkowski c95313f343 feat: optimize Docker build to exclude n8n dependencies
Major optimization that reduces Docker image size by 87% and build time by 10x:

- Remove ALL n8n dependencies from runtime Docker image
- Add package.runtime.json with only 5 essential runtime deps
- Optimize Dockerfile to build TypeScript without n8n packages
- Add BuildKit optimizations with cache mounts
- Update documentation to highlight the improvements

Results:
- Image size: ~1.5GB → ~200MB (87% reduction)
- Build time: ~12 minutes → ~1-2 minutes
- No n8n version conflicts at runtime
- Better security with minimal attack surface

The key insight is that since we always rebuild the database locally
before deployment, the Docker runtime never needs n8n packages.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-18 23:09:18 +02:00

73 lines
1.0 KiB
Plaintext

# .dockerignore
node_modules
npm-debug.log
.git
.gitignore
.env
.env.local
.env.*
# Keep nodes.db but exclude other database files
data/*.db
data/*.db-*
!data/nodes.db
dist
.DS_Store
*.log
coverage
.nyc_output
.vscode
.idea
*.swp
*.swo
*~
docker-compose.override.yml
.github
docs
tests
jest.config.js
.eslintrc.js
*.md
!README.md
!LICENSE
# Exclude n8n-docs if present
../n8n-docs
n8n-docs
# Exclude extracted nodes
extracted-nodes/
# Exclude temp directory
temp/
tmp/
# Exclude any backup or temporary files
*.bak
*.tmp
*.temp
# Exclude build artifacts
build/
out/
# Exclude local development files
.eslintcache
.stylelintcache
# Exclude any large test data
test-data/
# Exclude Docker files during build
Dockerfile*
docker-compose*.yml
.dockerignore
# Exclude development scripts
scripts/test-*.sh
scripts/deploy-*.sh
# Exclude TypeScript cache
.tscache
tsconfig.tsbuildinfo
# Exclude package manager caches
.npm
.pnpm-store
.yarn
# Exclude git hooks
.husky
# Exclude renovate config
renovate.json
# Exclude any local notes or TODO files
TODO*
NOTES*
*.todo