version: "3.9" services: postgres: image: postgres:16 container_name: vllm-studio-postgres environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=litellm volumes: - ./data/postgres:/var/lib/postgresql/data restart: unless-stopped # LiteLLM - API gateway (handles routing, format translation, cost tracking) litellm: image: ghcr.io/berriai/litellm:main-latest container_name: vllm-studio-litellm ports: - "4100:4000" volumes: - ./config/litellm.yaml:/app/config.yaml - ./data:/app/data environment: - LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-sk-master} - DATABASE_URL=postgresql://postgres:postgres@vllm-studio-postgres:5432/litellm extra_hosts: - "host.docker.internal:host-gateway" command: ["--config", "/app/config.yaml", "--port", "4000"] restart: unless-stopped depends_on: - postgres healthcheck: test: ["CMD-SHELL", "curl -fsS -H \"Authorization: Bearer ${LITELLM_MASTER_KEY:-sk-master}\" http://localhost:4000/health >/dev/null"] interval: 30s timeout: 10s retries: 3 # Frontend (optional) frontend: build: context: ./frontend args: NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080} container_name: vllm-studio-frontend ports: - "3000:3000" environment: - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8080} - NEXT_PUBLIC_LITELLM_URL=${NEXT_PUBLIC_LITELLM_URL:-http://localhost:4100} extra_hosts: - "host.docker.internal:host-gateway" restart: unless-stopped