diff --git a/docker-compose.yml b/docker-compose.yml index 36f6a6d60c8..386fcf86015 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3.8' services: db: build: @@ -13,11 +13,10 @@ services: - MYSQL_RANDOM_ROOT_PASSWORD=yes selenium: - image: selenium/standalone-firefox-debug:3.141.59-zirconium - volumes: - - /dev/shm:/dev/shm + image: selenium/standalone-firefox:4.25 ports: - - "5900:5900" + - "4444:4444" # Selenium WebDriver port + - "5900:5900" # VNC Viewer port (optional for VNC) web: build: @@ -62,58 +61,3 @@ services: - selenium - web entrypoint: /app/test/wait-for-services.sh - - selenium-debug: - image: selenium/standalone-firefox-debug:3.141.59-zirconium - links: - - web-debug:web - ports: - - "5901:5900" - - web-debug: - build: - context: . - dockerfile: Dockerfile.test.php8.debug - volumes: - - ./:/app - - ./test/test_instrument:/app/project/instruments - environment: - - LORIS_DB_CONFIG=/app/test/config.xml - - XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST} - - PHP_IDE_CONFIG=serverName=LorisTests - depends_on: - - db - command: php -S 0.0.0.0:8000 -t /app/htdocs /app/htdocs/router.php - - unit-tests-debug: - build: - context: . - dockerfile: Dockerfile.test.php8.debug - volumes: - - ./:/app - working_dir: /app - environment: - - LORIS_DB_CONFIG=test/config.xml - - XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST} - - PHP_IDE_CONFIG=serverName=LorisTests - depends_on: - - db - entrypoint: /app/test/wait-for-services.sh - - integration-tests-debug: - build: - context: . - dockerfile: Dockerfile.test.php8.debug - volumes: - - ./:/app - working_dir: /app - environment: - - LORIS_DB_CONFIG=test/config.xml - - SELENIUM_REQUIRED=true - - XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST} - - PHP_IDE_CONFIG=serverName=LorisTests - links: - - db - - selenium-debug:selenium - - web-debug:web - entrypoint: /app/test/wait-for-services.sh diff --git a/test/wait-for-services.sh b/test/wait-for-services.sh index 4b6baf087e6..643743ebc69 100755 --- a/test/wait-for-services.sh +++ b/test/wait-for-services.sh @@ -14,10 +14,11 @@ done if [ -v SELENIUM_REQUIRED ]; then echo "Waiting for Selenium..." - until $(curl --output /dev/null --silent --head --fail http://selenium:4444/wd/hub); do + until $(curl --output /dev/null --silent --head --fail http://selenium:4444/status); do sleep 1 done echo "Selenium is alive" fi exec $cmd +