services:
  php:
    depends_on:
      mysql:
        condition: service_healthy

  mysql:
    image: ${DOCKER_MYSQL_IMAGE}
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: yiitest
    healthcheck:
      test: ["CMD", "mysql", "-uroot", "-proot", "-e", "SELECT 1"]
      interval: 10s
      timeout: 3s
      retries: 5
