mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
fix: Docker container cleanup on session end (Issue #66)
- Added proper SIGTERM/SIGINT signal handlers to stdio-wrapper.ts - Removed problematic trap commands from docker-entrypoint.sh - Added STOPSIGNAL directive to Dockerfile for explicit signal handling - Implemented graceful shutdown in MCP server with database cleanup - Added stdin close detection for proper cleanup when Claude Desktop closes the pipe - Containers now properly exit with the --rm flag, preventing accumulation - Added --init flag to all Docker configuration examples - Updated documentation with container lifecycle management best practices - Bumped version to 2.7.20 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,9 @@ ENV IS_DOCKER=true
|
||||
# Expose HTTP port
|
||||
EXPOSE 3000
|
||||
|
||||
# Set stop signal to SIGTERM (default, but explicit is better)
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://127.0.0.1:3000/health || exit 1
|
||||
|
||||
Reference in New Issue
Block a user