Moved from a custom selenium UC standalone to selenium hub with a custom UC node
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 1m54s
Test, build and push image to registry / build-image (push) Successful in 3m0s

This commit is contained in:
2025-12-16 12:47:24 +01:00
parent 062f428fbc
commit 2a7330bd08
12 changed files with 142 additions and 37 deletions

View File

@@ -16,19 +16,19 @@ services:
ports:
- 80:80
depends_on:
db:
condition: service_healthy
undetected-chromedriver:
# db:
# condition: service_healthy
selenium-hub:
condition: service_healthy
db:
image: mysql:5.7
image: mariadb:latest
restart: unless-stopped
healthcheck:
test: ["CMD", 'mysqladmin', 'ping', '-h', 'db', '-u', '${DB_USERNAME}', '-p${DB_PASSWORD}' ]
interval: 2s
timeout: 20s
retries: 10
# healthcheck:
# test: ["CMD", 'mysqladmin', 'ping', '-h', 'db', '-u', '${DB_USERNAME}', '-p${DB_PASSWORD}' ]
# interval: 2s
# timeout: 20s
# retries: 10
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
@@ -37,17 +37,42 @@ services:
volumes:
- dbdata:/var/lib/mysql
undetected-chromedriver:
undetected-chromedriver-node:
build:
context: ./undetectedChromedriver
dockerfile: seleniumChromedriverDockerfile
restart: unless-stopped
volumes:
- /tmp:/tmp
- chromeProfile:/home/seluser/profile/
shm_size: 2gb
tty: true
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
ports:
- "4444:4444"
- "7900:7900"
networks:
- selenium-grid
selenium-hub:
image: selenium/hub:latest
healthcheck:
test: "curl -s http://localhost:4444/wd/hub/status | jq -e '.value.ready == true' || exit 1"
interval: 30s
timeout: 10s
retries: 3
tty: true
ports:
- "4442-4444:4442-4444"
networks:
- default
- selenium-grid
networks:
selenium-grid:
driver: bridge
volumes:
dbdata:
chromeProfile: