# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Quick start docker-compose file for BanyanDB MCP Server testing
# This starts BanyanDB in standalone mode with HTTP API enabled
# Data is persisted to ./banyandb-data directory

services:
  banyandb:
    image: ghcr.io/apache/skywalking-banyandb:3122e6f59b85ae6cc41617a2512f76f5e1cdf45e
    container_name: banyandb
    command: >
      standalone
      --metadata-root-path=/data/metadata
      --stream-root-path=/data/stream
      --measure-root-path=/data/measure
      --property-root-path=/data/property
      --trace-root-path=/data/trace
    ports:
      - "17912:17912"  # gRPC port
      - "17913:17913"  # HTTP port (used by MCP server)
    volumes:
      # Persist metadata and data to host filesystem
      - ./banyandb-data:/data
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:17913/api/v1/bydbql/query"]
      interval: 5s
      timeout: 3s
      retries: 5
    restart: unless-stopped
