# 本地开发用 MySQL + Redis（与生产隔离）。
# 用法：docker compose -f dev/docker-compose.yml up -d
services:
  mysql:
    image: mysql:8.0
    container_name: pangolin-dev-mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: pangolin
    ports:
      - "13306:3306"   # 避让本机已占用的 3306
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-proot"]
      interval: 3s
      timeout: 3s
      retries: 20
    volumes:
      - pangolin-dev-mysql:/var/lib/mysql

  redis:
    image: redis:7-alpine
    container_name: pangolin-dev-redis
    ports:
      - "16379:6379"   # 避让本机已占用的 6379

volumes:
  pangolin-dev-mysql:
