services:
  mysql:
    image: mysql:8.4
    container_name: mysql
    environment:
      MYSQL_ROOT_PASSWORD: Pruva2026!
      MYSQL_DATABASE: dataease
    ports:
      - "3306:3306"
    volumes:
      - mysql_data:/var/lib/mysql
      - /root/.pruva/runs/cve-2026-40900_20260525-232644/repro/init.sql:/docker-entrypoint-initdb.d/init.sql
      - /root/.pruva/runs/cve-2026-40900_20260525-232644/repro/my.cnf:/etc/mysql/conf.d/my.cnf
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-pPruva2026!"]
      interval: 5s
      timeout: 3s
      retries: 10
    networks:
      - de-net

  pg:
    image: postgres:15
    container_name: pg
    environment:
      POSTGRES_PASSWORD: Pruva2026!
      POSTGRES_DB: dataease
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d dataease"]
      interval: 5s
      timeout: 3s
      retries: 10
    networks:
      - de-net

  dataease:
    image: registry.cn-qingdao.aliyuncs.com/dataease/dataease:v2.10.21
    container_name: dataease
    ports:
      - "8100:8100"
    volumes:
      - /root/.pruva/runs/cve-2026-40900_20260525-232644/repro/application.yml:/opt/apps/config/application.yml
    depends_on:
      mysql:
        condition: service_healthy
      pg:
        condition: service_healthy
    networks:
      - de-net

volumes:
  mysql_data:

networks:
  de-net:
