|
version: "3.11"
|
|
services:
|
|
litellm:
|
|
build:
|
|
context: .
|
|
args:
|
|
target: runtime
|
|
image: ghcr.io/berriai/litellm:main-stable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ports:
|
|
- "4000:4000"
|
|
environment:
|
|
DATABASE_URL: "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
|
|
STORE_MODEL_IN_DB: "True"
|
|
env_file:
|
|
- .env
|
|
|
|
|
|
db:
|
|
image: postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: litellm
|
|
POSTGRES_USER: llmproxy
|
|
POSTGRES_PASSWORD: dbpassword9090
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
|
|
interval: 1s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
prometheus:
|
|
image: prom/prometheus
|
|
volumes:
|
|
- prometheus_data:/prometheus
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
ports:
|
|
- "9090:9090"
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--storage.tsdb.retention.time=15d'
|
|
restart: always
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
driver: local
|
|
|
|
|
|
|
|
|