Skip to content

Conversation

@mlimarenko
Copy link
Contributor

Description

Makefile-based quick deployment system with an interactive setup wizard. The new setup process simplifies LightRAG deployment by providing preset configurations (development, production, custom) and automating environment configuration, Docker Compose file generation, and service management.

The interactive wizard guides users through:

  • Storage backend selection (PostgreSQL, Neo4j, MongoDB, Qdrant, Milvus, Redis, Memgraph)
  • LLM provider configuration
  • Docker service setup with customizable image tags
  • Environment variable validation and backup
  • Automatic docker-compose file generation

Related Issues

N/A - This is a new feature to improve deployment experience and reduce setup time.

Changes Made

Core Files

  • Makefile: New Makefile with targets for setup, setup-quick, setup-production, setup-validate, setup-backup, and setup-help
  • scripts/setup/setup.sh: Main interactive setup script (1218 lines) with wizard functionality

Documentation

  • docs/InteractiveSetup.md: New documentation for Makefile-based setup workflow
  • docs/DockerDeployment.md: Updated with references to interactive setup and CPU mode configuration examples
  • env.example: Enhanced with CPU mode configuration comments and additional deployment options

Setup Scripts Library

  • scripts/setup/lib/file_ops.sh: File operations utilities (backup, validation, etc.)
  • scripts/setup/lib/presets.sh: Preset configuration definitions
  • scripts/setup/lib/prompts.sh: Interactive prompt utilities
  • scripts/setup/lib/storage_requirements.sh: Storage backend requirements and validation
  • scripts/setup/lib/validation.sh: Environment variable and configuration validation

Presets

  • scripts/setup/presets/development.sh: Development preset (local JSON/NetworkX)
  • scripts/setup/presets/local.sh: Local deployment preset
  • scripts/setup/presets/production.sh: Production preset with security prompts

Docker Compose Templates

  • scripts/setup/templates/: Templates for all supported storage backends and services:
    • PostgreSQL, Neo4j, MongoDB, Qdrant, Milvus, Redis, Memgraph
    • vLLM rerank service (CPU and GPU variants)

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated (if necessary)
  • Unit tests added (if applicable)

Additional Notes

Key Features

  1. Quick Start: make setup-quick provides a minimal-prompt development setup
  2. Production Ready: make setup-production includes security and SSL configuration prompts
  3. Flexible: Custom mode allows manual selection of each component
  4. Safe: Automatic .env backup before modifications
  5. Validated: Built-in validation of environment variables and configurations

Backward Compatibility

  • All existing deployment methods remain unchanged
  • New Makefile targets are optional additions
  • Existing docker-compose.yml is not modified by the wizard
  • Generated compose files use separate names (e.g., docker-compose.development.yml)

Usage Examples

Quick development setup

make setup-quick

Full production setup with security prompts

make setup-production

Custom configuration wizard

make setup

Validate existing configuration

make setup-validate

Backup current .env

make setup-backup

@danielaskdd
Copy link
Collaborator

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3 to +6
command: >
${VLLM_RERANK_MODEL:-BAAI/bge-reranker-v2-m3}
--port ${VLLM_RERANK_PORT:-8000}
--dtype ${VLLM_RERANK_DTYPE:-float32}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use --model flag in vLLM rerank command

The vLLM reranker compose template launches vllm/vllm-openai with the model name as a bare positional argument (BAAI/bge-reranker-v2-m3) instead of passing it via the required --model flag. The vLLM OpenAI entrypoint requires --model and exits with an argparse error if it is omitted, so any stack generated with the wizard that adds the vLLM rerank service will fail to start (same issue in the GPU variant). Please include --model before the model name in both templates so the container can boot.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants