Complete Docker support for LeanRAG with MySQL container setup and management tools #1
+279
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR completes the Docker infrastructure for LeanRAG by implementing the missing components referenced in the
MYSQL_DOCKER_README.mddocumentation. The existing documentation described a complete Docker setup, but several key files were missing from the repository.What was missing
The
MYSQL_DOCKER_README.mdfile documented a comprehensive Docker setup with three deployment options, but the following critical files were missing:mysql-init/01-init.sql- MySQL initialization script for database setupmysql-docker.sh- Management script for easy container operationsWithout these files, users couldn't actually use the documented Docker setup methods.
What this PR adds
1. MySQL Initialization Script (
mysql-init/01-init.sql)leanrag_defaultdatabase with proper UTF-8 configurationdatabase_utils.pyrequirements2. Container Management Script (
mysql-docker.sh)A comprehensive management script providing:
3. Docker Compose Updates
versionattribute that was causing warningsTesting performed
✅ Docker Compose setup -
docker compose up -d mysqlworks correctly✅ Management script - All commands (
start,stop,status,connect, etc.) function properly✅ Database connectivity - MySQL accessible on
localhost:4321withroot/123credentials✅ Database integration -
database_utils.pyfunctions work correctly with Docker setup✅ Table creation - Automatic creation of
entities,relations, andcommunitiestables✅ Data persistence - MySQL data persists across container restarts via Docker volumes
Usage examples
Users can now choose from three documented setup methods:
This implementation ensures that the LeanRAG framework now has complete, production-ready Docker support that matches the existing documentation, making it significantly easier for users to deploy and develop with the framework.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.