128 lines
3.2 KiB
YAML
128 lines
3.2 KiB
YAML
name: llm-stack
|
|
|
|
services:
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
container_name: ollama
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama-data:/root/.ollama
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
open-webui-db:
|
|
image: postgres:16-alpine
|
|
container_name: open-webui-db
|
|
environment:
|
|
POSTGRES_DB: ${OPENWEBUI_DB_NAME:-openwebui}
|
|
POSTGRES_USER: ${OPENWEBUI_DB_USER:-openwebui}
|
|
POSTGRES_PASSWORD: ${OPENWEBUI_DB_PASSWORD:-openwebui_change_me}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${OPENWEBUI_DB_USER:-openwebui} -d ${OPENWEBUI_DB_NAME:-openwebui}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
volumes:
|
|
- openwebui-db-data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:main-stable
|
|
container_name: litellm
|
|
command: ["--config", "/app/config.yaml", "--host", "0.0.0.0", "--port", "4000"]
|
|
environment:
|
|
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-sk-lite-llm-change-me}
|
|
LITELLM_SALT_KEY: ${LITELLM_SALT_KEY:-salt-lite-llm-change-me}
|
|
volumes:
|
|
- ./config/litellm/config.yaml:/app/config.yaml:ro
|
|
ports:
|
|
- "4000:4000"
|
|
depends_on:
|
|
- ollama
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
mcpo:
|
|
image: python:3.12-slim
|
|
container_name: mcpo
|
|
command:
|
|
- /bin/sh
|
|
- -lc
|
|
- |
|
|
pip install --no-cache-dir mcpo &&
|
|
mcpo --config /config/mcpo.json --host 0.0.0.0 --port 8000
|
|
volumes:
|
|
- ./config/mcpo/mcpo.json:/config/mcpo.json:ro
|
|
ports:
|
|
- "8001:8000"
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
contextforge:
|
|
image: ghcr.io/contextforge/contextforge:latest
|
|
container_name: contextforge
|
|
profiles: ["tools"]
|
|
environment:
|
|
CONTEXTFORGE_CONFIG: /config/contextforge.yaml
|
|
volumes:
|
|
- ./config/contextforge/contextforge.yaml:/config/contextforge.yaml:ro
|
|
ports:
|
|
- "8787:8787"
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
open-webui:
|
|
image: ghcr.io/open-webui/open-webui:main
|
|
container_name: open-webui
|
|
environment:
|
|
DATABASE_URL: postgresql://${OPENWEBUI_DB_USER:-openwebui}:${OPENWEBUI_DB_PASSWORD:-openwebui_change_me}@open-webui-db:5432/${OPENWEBUI_DB_NAME:-openwebui}
|
|
OLLAMA_BASE_URL: http://ollama:11434
|
|
OPENAI_API_BASE_URL: http://litellm:4000/v1
|
|
ENABLE_OLLAMA_API: "true"
|
|
ENABLE_OPENAI_API: "true"
|
|
volumes:
|
|
- open-webui-data:/app/backend/data
|
|
ports:
|
|
- "11435:8080"
|
|
depends_on:
|
|
open-webui-db:
|
|
condition: service_healthy
|
|
ollama:
|
|
condition: service_started
|
|
litellm:
|
|
condition: service_started
|
|
mcpo:
|
|
condition: service_started
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
open-webui-computer:
|
|
image: ghcr.io/open-webui/computer:latest
|
|
container_name: open-webui-computer
|
|
profiles: ["tools"]
|
|
volumes:
|
|
- ./cptr-data:/data
|
|
- ./cptr-workspace:/workspace
|
|
ports:
|
|
- "8000:8000"
|
|
restart: unless-stopped
|
|
networks:
|
|
- llm-net
|
|
|
|
volumes:
|
|
ollama-data:
|
|
open-webui-data:
|
|
openwebui-db-data:
|
|
|
|
networks:
|
|
llm-net:
|
|
name: llm-net
|