version: '3.8' # Rename this whole connection by editing SPARKLE_NAME in the .env file # in this directory - no code changes needed. It's used for the # container name, the display name in API responses, and can also be # used as the model id shown in Open WebUI (via SPARKLE_MODEL_ID below). services: sparkle: build: context: . dockerfile: Dockerfile container_name: ${SPARKLE_NAME:-sparkle} ports: - "5000:5000" volumes: - ./sparkle_logs:/sparkle/sparkle_logs - ./sparkle_config.json:/sparkle/sparkle_config.json - ./secrets.yaml:/sparkle/secrets.yaml environment: SPARKLE_PORT: 5000 SPARKLE_DEBUG: "false" PYTHONUNBUFFERED: 1 SPARKLE_NAME: ${SPARKLE_NAME:-Sparkle} SPARKLE_MODEL_ID: ${SPARKLE_NAME:-sparkle} # Runtime parameter: point at a different secrets file without # rebuilding the image, e.g. /sparkle/custom_secrets.yaml SPARKLE_SECRETS_FILE: /sparkle/secrets.yaml restart: unless-stopped command: python sparkle_openai_compat.py healthcheck: test: ["CMD", "curl", "-f", "http://localhost:5000/health"] interval: 10s timeout: 5s retries: 5 start_period: 5s networks: - sparkle-network open-webui: image: ghcr.io/open-webui/open-webui:latest container_name: open-webui-${SPARKLE_NAME:-sparkle} ports: - "3000:8080" volumes: - open-webui-data:/app/backend/data environment: - OPENAI_API_BASE_URLS=http://sparkle:5000/v1 - OPENAI_API_KEYS=sk-no-key-required - ENABLE_OPENAI_API=true - ENABLE_OLLAMA_API=false - WEBUI_AUTH=false restart: unless-stopped networks: - sparkle-network depends_on: sparkle: condition: service_healthy networks: sparkle-network: driver: bridge volumes: open-webui-data: