# APISIX 声明式网关（Docker 启动后使用）
# 前置：启动 Docker Desktop，并保证宿主机 platform:8888 / ai:8001 已运行

services:
  etcd:
    image: bitnami/etcd:3.5
    environment:
      ALLOW_NONE_AUTHENTICATION: "yes"
      ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379
      ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
    volumes:
      - etcd_data:/bitnami/etcd

  apisix:
    image: apache/apisix:3.11.0-debian
    depends_on:
      - etcd
    ports:
      - "9080:9080"   # HTTP 入口
      - "9180:9180"   # Admin API
    volumes:
      - ./apisix/config.yaml:/usr/local/apisix/conf/config.yaml:ro
      - ./apisix/apisix.yaml:/usr/local/apisix/conf/apisix.yaml:ro
    environment:
      TZ: Asia/Shanghai

volumes:
  etcd_data:
