refactor: extract LiteLLM into dedicated aido-litellm stack

LiteLLM proxy, database and Redis are no longer
managed by this repository. They have moved to aido-litellm.

- Remove litellm-proxy, litellm-db, litellm-redis services from
  docker-compose.yml
- Remove litellm-config.yaml (now maintained in aido-litellm)
- Prune LiteLLM-specific environment variables from .env.example
This commit is contained in:
Jannic Debus 2026-09-30 23:59:26 +02:00
parent 01be9421df
commit 9903f9dca7
2 changed files with 1 additions and 225 deletions

View file

@ -329,28 +329,4 @@ REDIS_HOST=cache
MODEL_SERVER_HOST=inference_model_server
INDEXING_MODEL_SERVER_HOST=indexing_model_server
INTERNAL_URL=http://api_server:8080
ENABLE_CONTEXTUAL_RAG=true
# =============================================================================
# LiteLLM Proxy Settings
# =============================================================================
LITELLM_MASTER_KEY=sk-$(openssl rand -hex 32)
LITELLM_SALT_KEY=$(openssl rand -hex 32)
DATABASE_URL=postgresql://llmproxy:${POSTGRES_PASSWORD}@litellm-db:5432/litellm
POSTGRES_PASSWORD=$(openssl rand -hex 16)
INFOMANIAK_BASE=https://api.infomaniak.com/2/ai/XYZ/openai/v1
INFOMANIAK_API_KEY=
# =============================================================================
# DOCUMENT INGESTION CONFIGURATION
# =============================================================================
# Onyx Ingestion API Key (generate via Admin Panel -> Settings -> API Keys)
ONYX_INGESTION_API_KEY=your-api-key-here
# Connector Credential Pair ID (from Admin Panel -> Connectors)
# Get this from the URL: /admin/connector/<ID> -> cc_pair_id
ONYX_CC_PAIR_ID=243
# How often to check for new files (in seconds)
INGESTION_INTERVAL_SECONDS=300
# Host path to your SMB/network mount
# Example: /mnt/smb-share or /Volumes/network-drive
DOCUMENT_SOURCE_HOST_PATH=/opt/stacks/onyx/ingestion_data
ENABLE_CONTEXTUAL_RAG=true

View file

@ -1,40 +1,3 @@
# =============================================================================
# ONYX DOCKER COMPOSE
# =============================================================================
# This is the default configuration for Onyx. This file is fairly configurable,
# also see env.template for possible settings.
#
# PRODUCTION DEPLOYMENT CHECKLIST:
# To convert this setup to a production deployment following best practices,
# follow the checklist below. Note that there are other ways to secure the Onyx
# deployment so these are not strictly necessary for all teams.
#
# 1. SECURITY HARDENING:
# - Remove all port exposures except nginx (80/443)
# - Comment out ports for: api_server, relational_db, cache, minio
# - Set strong MinIO/S3 credentials (MINIO_ROOT_* + S3_AWS_*), not minioadmin
#
# 2. SSL/TLS SETUP:
# - Uncomment the certbot service (see below)
# - Add SSL certificate volumes to nginx service
# - Change nginx command from app.conf.template to app.conf.template.prod
#
# 3. ENVIRONMENT CONFIGURATION:
# - Replace env_file with explicit environment variables
#
# 4. AUTHENTICATION:
# - Select an authentication method like Basic, Google OAuth, OIDC, or SAML
#
# 5. CA CERTIFICATES:
# - Uncomment custom CA certificate volumes if needed
#
# 6. DOMAIN CONFIGURATION:
# - Set proper DOMAIN environment variable for nginx
# - Configure DNS and SSL certificates
#
# For a complete production setup, refer to docker-compose.prod.yml
# =============================================================================
name: onyx
services:
api_server:
@ -217,67 +180,6 @@ services:
retries: 5
start_period: 30s
# Object (S3) file store. Official Onyx ships this; required by the backend
# If not using, specify external S3-compatible provider
# (S3_ENDPOINT_URL=http://minio:9000). Without it api_server cannot start.
#minio:
# image: minio/minio:RELEASE.2025-07-23T15-54-02Z-cpuv1
# restart: unless-stopped
# environment:
# MINIO_ROOT_USER: ${MINIO_ROOT_USER:?set a strong value in .env}
# MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:?set a strong value in .env}
# MINIO_DEFAULT_BUCKETS: ${S3_FILE_STORE_BUCKET_NAME:-onyx-file-store-bucket}
# command: server /data --console-address ":9001"
# volumes:
# - minio_data:/data
# networks:
# - onyx-network
# healthcheck:
# test: ["CMD", "mc", "ready", "local"]
# interval: 30s
# timeout: 20s
# retries: 3
# Uncomment the block below to enable the MCP server for Onyx.
# mcp_server:
# image: ${ONYX_BACKEND_IMAGE:-onyxdotapp/onyx-backend:${IMAGE_TAG:-latest}}
# build:
# context: ../../backend
# dockerfile: Dockerfile
# command: >
# /bin/sh -c "if [ \"${MCP_SERVER_ENABLED:-}\" != \"True\" ] && [ \"${MCP_SERVER_ENABLED:-}\" != \"true\" ]; then
# echo 'MCP server is disabled (MCP_SERVER_ENABLED=false), skipping...';
# exit 0;
# else
# exec python -m onyx.mcp_server_main;
# fi"
# env_file:
# - path: .env
# required: false
# depends_on:
# - relational_db
# - cache
# restart: "no"
# environment:
# - POSTGRES_HOST=${POSTGRES_HOST:-relational_db}
# - REDIS_HOST=${REDIS_HOST:-cache}
# # MCP Server Configuration
# - MCP_SERVER_ENABLED=${MCP_SERVER_ENABLED:-false}
# - MCP_SERVER_PORT=${MCP_SERVER_PORT:-8090}
# - MCP_SERVER_CORS_ORIGINS=${MCP_SERVER_CORS_ORIGINS:-}
# - API_SERVER_PROTOCOL=${API_SERVER_PROTOCOL:-http}
# - API_SERVER_HOST=${API_SERVER_HOST:-api_server}
# extra_hosts:
# - "host.docker.internal:host-gateway"
# logging:
# driver: json-file
# options:
# max-size: "50m"
# max-file: "6"
# # Optional, only for debugging purposes
# volumes:
# - mcp_server_logs:/var/log/onyx
inference_model_server:
image: ${ONYX_MODEL_SERVER_IMAGE:-onyxdotapp/onyx-model-server:${IMAGE_TAG:-latest}}
networks:
@ -505,106 +407,6 @@ services:
user: root
volumes:
- ${DOCKER_SOCK_PATH:-/var/run/docker.sock}:/var/run/docker.sock
# litellm proxy
litellm-proxy:
image: docker.litellm.ai/berriai/litellm:main-stable
restart: unless-stopped
volumes:
- ./litellm-config.yaml:/app/config.yaml
command: >
--config /app/config.yaml
--port 4000
--num_workers 2
--max_requests_before_restart 10000
--max_requests_before_restart_jitter 1000
--run_gunicorn
networks:
- litellm-network
- onyx-network
expose:
- 4000
environment:
- INFOMANIAK_API_KEY=${INFOMANIAK_API_KEY}
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY}
- REDIS_HOST=litellm-redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD}
- LITELLM_SALT_KEY=${LITELLM_SALT_KEY}
- LITELLM_MODE=PRODUCTION
- LITELLM_LOG=ERROR
- NUM_WORKERS=2
- MAX_REQUESTS_BEFORE_RESTART=10000
- MAX_REQUESTS_BEFORE_RESTART_JITTER=1000
- DATABASE_URL=${DATABASE_URL}
- GUNICORN_TIMEOUT=120
- UVICORN_TIMEOUT=120
env_file:
- .env # Load local .env file
depends_on:
- litellm-db # Indicates that this service depends on the 'db' service, ensuring 'db' starts first
- litellm-redis
healthcheck:
# Defines the health check configuration for the container
test:
- CMD-SHELL
- python3 -c "import urllib.request;
urllib.request.urlopen('http://localhost:4000/health/liveliness')" # Command to execute for health check
interval: 30s # Perform health check every 30 seconds
timeout: 10s # Health check command times out after 10 seconds
retries: 3 # Retry up to 3 times if health check fails
start_period: 120s # Wait 120 seconds after container start before beginning health checks
deploy:
resources:
limits:
cpus: '2.0'
memory: 4G
reservations:
cpus: '1.0'
memory: 1G
memswap_limit: 4G
litellm-db:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: litellm
POSTGRES_USER: llmproxy
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
command: -c 'max_connections=200'
env_file:
- .env # Load local .env file
networks:
- litellm-network
volumes:
- ./litellm_postgres_data:/var/lib/postgresql/data # Persists Postgres data across container restarts
healthcheck:
test:
- CMD-SHELL
- pg_isready -d litellm -U llmproxy
interval: 10s
timeout: 5s
retries: 10
litellm-redis:
image: redis:7-alpine
restart: unless-stopped
environment:
- REDIS_HOST=litellm-redis
- REDIS_PORT=6379
- REDIS_SSL=False
env_file:
- .env # Load local .env file
networks:
- litellm-network
volumes:
- ./litellm_redis_data:/data
healthcheck:
test:
- CMD
- redis-cli
- ping
interval: 5s
timeout: 3s
retries: 5
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
# Persistent data for OpenSearch.
opensearch-data: null
@ -613,8 +415,6 @@ volumes:
networks:
onyx-network:
driver: bridge
litellm-network:
driver: bridge
web:
name: web
external: true