diff --git a/.ahoy.yml b/.ahoy.yml index d195fa477..f8120d882 100644 --- a/.ahoy.yml +++ b/.ahoy.yml @@ -36,6 +36,7 @@ commands: COMPOSE_PROJECT_NAME=${COMPOSE_PROJECT_NAME:-${PWD##*/}} \ DREVOPS_HOST_DB_PORT=$(docker compose port mariadb 3306 2>/dev/null | cut -d : -f 2) \ DREVOPS_HOST_SOLR_PORT=$(docker compose port solr 8983 2>/dev/null | cut -d : -f 2) \ + DREVOPS_HOST_SELENIUM_VNC_PORT=$(docker compose port chrome 7900 2>/dev/null | cut -d : -f 2) \ DREVOPS_HOST_HAS_SEQUELACE=$(uname -a | grep -i -q darwin && mdfind -name 'Sequel Ace' 2>/dev/null | grep -q "Ace" && echo 1 || true) \ ahoy cli ./scripts/drevops/info.sh "$@" diff --git a/.scaffold/tests/bats/_helper.workflow.bash b/.scaffold/tests/bats/_helper.workflow.bash index 7831eea9e..8f04592ad 100644 --- a/.scaffold/tests/bats/_helper.workflow.bash +++ b/.scaffold/tests/bats/_helper.workflow.bash @@ -303,6 +303,7 @@ assert_ahoy_info() { assert_output_not_contains "DB-in-image : ${db_image}" fi assert_output_contains "Solr URL on host :" + assert_output_contains "Selenium VNC URL on host :" assert_output_contains "Mailhog URL : http://mailhog.docker.amazee.io/" assert_output_contains "Xdebug : Disabled ('ahoy debug' to enable)" assert_output_not_contains "Containers are not running." diff --git a/.scaffold/tests/bats/fixtures/docker-compose.env.json b/.scaffold/tests/bats/fixtures/docker-compose.env.json index 82c8d2112..5692f4874 100644 --- a/.scaffold/tests/bats/fixtures/docker-compose.env.json +++ b/.scaffold/tests/bats/fixtures/docker-compose.env.json @@ -49,6 +49,13 @@ "networks": { "default": null }, + "ports": [ + { + "mode": "ingress", + "protocol": "tcp", + "target": 7900 + } + ], "shm_size": "1073741824", "volumes": [ { diff --git a/.scaffold/tests/bats/fixtures/docker-compose.env_local.json b/.scaffold/tests/bats/fixtures/docker-compose.env_local.json index 82c8d2112..5692f4874 100644 --- a/.scaffold/tests/bats/fixtures/docker-compose.env_local.json +++ b/.scaffold/tests/bats/fixtures/docker-compose.env_local.json @@ -49,6 +49,13 @@ "networks": { "default": null }, + "ports": [ + { + "mode": "ingress", + "protocol": "tcp", + "target": 7900 + } + ], "shm_size": "1073741824", "volumes": [ { diff --git a/.scaffold/tests/bats/fixtures/docker-compose.env_mod.json b/.scaffold/tests/bats/fixtures/docker-compose.env_mod.json index 75948e3b0..7d710f1e6 100644 --- a/.scaffold/tests/bats/fixtures/docker-compose.env_mod.json +++ b/.scaffold/tests/bats/fixtures/docker-compose.env_mod.json @@ -49,6 +49,13 @@ "networks": { "default": null }, + "ports": [ + { + "mode": "ingress", + "protocol": "tcp", + "target": 7900 + } + ], "shm_size": "1073741824", "volumes": [ { diff --git a/.scaffold/tests/bats/fixtures/docker-compose.noenv.json b/.scaffold/tests/bats/fixtures/docker-compose.noenv.json index c5689cb69..dd8b0e2d2 100644 --- a/.scaffold/tests/bats/fixtures/docker-compose.noenv.json +++ b/.scaffold/tests/bats/fixtures/docker-compose.noenv.json @@ -49,6 +49,13 @@ "networks": { "default": null }, + "ports": [ + { + "mode": "ingress", + "protocol": "tcp", + "target": 7900 + } + ], "shm_size": "1073741824", "volumes": [ { diff --git a/docker-compose.yml b/docker-compose.yml index bb5bc7365..84f28e03d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -222,6 +222,8 @@ services: # Chrome container, used for browser testing. chrome: image: selenium/standalone-chromium:126.0 + ports: + - "7900" # Find port on host with `docker-compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. <<: *default-volumes # Use default volumes to provide access to test fixtures. environment: diff --git a/scripts/drevops/info.sh b/scripts/drevops/info.sh index 6256b07a6..fcadc45d6 100755 --- a/scripts/drevops/info.sh +++ b/scripts/drevops/info.sh @@ -44,6 +44,9 @@ fi if [ -n "${DREVOPS_HOST_SOLR_PORT:-}" ]; then note "Solr URL on host : http://127.0.0.1:${DREVOPS_HOST_SOLR_PORT}" fi +if [ -n "${DREVOPS_HOST_SELENIUM_VNC_PORT:-}" ]; then + note "Selenium VNC URL on host : http://localhost:${DREVOPS_HOST_SELENIUM_VNC_PORT}/?autoconnect=1&password=secret" +fi note "Mailhog URL : http://mailhog.docker.amazee.io/" note "Xdebug : $(php -v | grep -q Xdebug && echo "Enabled ('ahoy up cli' to disable)" || echo "Disabled ('ahoy debug' to enable)")" if [ "${DREVOPS_SHOW_LOGIN}" = "1" ] || [ -n "${1:-}" ]; then