Skip to content

Quick Deploy

Leliel running from scratch in under 10 minutes.


Leliel ships its own docker-compose.yml. This is the fastest path to a running instance.

Prerequisites

  • Docker Desktop or Docker Engine with Compose v2
  • A .env file in the repo root (copy from .env.example)

Step 1: Clone and configure

# Clone the repository and copy the example environment file
git clone https://github.com/rtsko/leliel.git
cd leliel
cp .env.example .env

Open .env and fill in the required values in the [APP] section:

# Required: choose a strong password; Neo4j rejects the default "neo4j"
NEO4J_PASSWORD=your-strong-password

# Required: generate two random strings for the API keys
KNOWLEDGE_API_KEY=your-pipeline-key
KNOWLEDGE_API_USER_KEY=your-user-key

Step 2: Start the stack

# Build the knowledge-api image and start both services in the background
docker compose up --build -d

Services after startup:

Service URL
Knowledge API http://localhost:8080
Interactive docs http://localhost:8080/docs
Neo4j browser http://localhost:7474
Neo4j Bolt bolt://localhost:7687

Startup order

knowledge-api waits for Neo4j to pass its HTTP health probe before starting. Allow 30-60 seconds on first boot.

Step 3: Verify

# Confirm the API is accepting authenticated requests; expected response is []
curl -s http://localhost:8080/api/v1/repos \
  -H "Authorization: Bearer your-user-key"

Data preservation

docker compose down stops the stack and preserves all graph data in the neo4j_data volume. docker compose down -v destroys the volume and all data permanently. Use -v only when you intend to reset.


Local development

For running Leliel directly on a developer machine, without Docker.

Prerequisites

  • Python 3.10 or later
  • Neo4j accessible at bolt://localhost:7687

Step 1: Create the virtualenv and install dependencies

# Create an isolated Python virtual environment and install all dependencies
python -m venv .venv
source .venv/bin/activate    # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Step 2: Configure .env

# Copy the example environment file and populate it with your local values
cp .env.example .env

Minimum values for local development:

NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your-local-neo4j-password
KNOWLEDGE_API_KEY=dev-pipeline-key
KNOWLEDGE_API_USER_KEY=dev-user-key

Step 3: Start the server

# Start Uvicorn with hot-reload for development; API is at localhost:8080
uvicorn app.main:app --host 0.0.0.0 --port 8080 --reload

Interactive docs at http://localhost:8080/docs.

Step 4: Run the test suite

# Execute the full pytest test suite; no real Neo4j connection required for unit tests
pytest