Skip to content

New Feature: Add optional LiteLLM Docker Compose setup for local LLM gateway#526

Open
marazik wants to merge 3 commits into
AsyncFuncAI:mainfrom
marazik:feature/litellm-docker-compose
Open

New Feature: Add optional LiteLLM Docker Compose setup for local LLM gateway#526
marazik wants to merge 3 commits into
AsyncFuncAI:mainfrom
marazik:feature/litellm-docker-compose

Conversation

@marazik
Copy link
Copy Markdown
Contributor

@marazik marazik commented May 19, 2026

Summary:
This adds a new feature, an optional LiteLLM Docker Compose setup for local LLM routing. It is Opt-in and doesn't change existing behavior.
PR1 - Docker compose (current PR)
PR2 - Integration code (will follow)
PR3 - Documentation

Details:
This PR introduces an optional Docker Compose setup for LiteLLM, enabling a local LLM gateway that can be used alongside the existing DeepWiki-Open stack.

It is fully opt-in and does not modify the default application runtime or existing Docker configuration.

Changes

  • Added docker-compose-litellm.yml for standalone DeepWiki-Open + LiteLLM stack
  • Added docker-compose-litellm.env for environment configuration
  • Added Dockerfile-litellm for service containerization
  • Added litellm-config.yml for runtime configuration

Note: Currently Dockerfile-litellm mirrors the existing Dockerfile to keep the setup consistent. It serves as an extension point for future modifications (e.g., optional removal of Ollama dependency).


Key Properties

  • Fully isolated from existing DeepWiki-Open setup
  • No changes to core application logic
  • Can be enabled independently of main stack
  • Supports local-first LLM routing via LiteLLM

Usage

ollama serve
docker compose -f docker-compose-litellm.yml up -d

Impact

  • No impact on default system behavior
  • Adds optional LLM abstraction layer for local development and testing
  • Enables future integration of provider-agnostic LLM routing

Future Work

  • Integration with DeepWiki-Open LLM client layer (PR2)
  • Extended documentation and usage examples (PR3)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Docker-based deployment configuration for DeepWiki using LiteLLM and Ollama, including a multi-stage Dockerfile, a Docker Compose setup, and LiteLLM configuration files. The review identifies several security risks involving hardcoded API keys and database passwords that should be moved to environment variables. Additionally, there are networking issues in the LiteLLM configuration regarding the Ollama API base, and the Dockerfile is missing several optimizations and dependencies found in the original version, such as build caching, memory limits, and CA certificates. Feedback also suggests avoiding pulling large LLM models during the build process to improve image portability and build reliability.

Comment thread docker-compose-litellm.env Outdated
Comment thread docker-compose-litellm.yml Outdated
Comment thread docker-compose-litellm.yml Outdated
Comment thread litellm-config.yml
Comment thread litellm-config.yml
Comment thread Dockerfile-litellm
Comment thread Dockerfile-litellm Outdated
Comment thread Dockerfile-litellm
Comment thread Dockerfile-litellm
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.

1 participant