services: litellm: image: ghcr.io/berriai/litellm:main-latest container_name: litellm-gateway ports: - "4000:4000" volumes: - ./config.yaml:/app/config.yaml env_file: - .env environment: - LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY} - DATABASE_URL=postgresql://litellm:${POSTGRES_PASSWORD}@db:5432/litellm - REDIS_URL=redis://redis:6379 - UI_USERNAME=${UI_USERNAME} - UI_PASSWORD=${UI_PASSWORD} depends_on: - db - redis command: [ "--config", "/app/config.yaml", "--detailed_debug" ] restart: unless-stopped db: image: postgres:15-alpine container_name: litellm-db environment: POSTGRES_DB: litellm POSTGRES_USER: litellm POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - ./litellm_db_data:/var/lib/postgresql/data restart: unless-stopped redis: image: redis:alpine container_name: litellm-redis restart: unless-stopped